Strata · Errors

WRONG_OWNER

createUpgrader throws WRONG_OWNER when it is passed a sequence that owns tables. A sequence with no documents and no document step is treated as one that owns tables; here that is a kit at its first release, with migrations: []. Declaring a kind of its own (documents: { props: {} }) makes the sequence a grammar from the start.

Sequence (KIT)
{ id: 'theatre.kit', migrations: [] }
Call
await createUpgrader([NOVA_SEQUENCE, PRISM_SEQUENCE, KIT], { transform: evaluate })
Error
WRONG_OWNER
Documents are upgraded by grammar sequences; these own tables and belong to a database's ledger
(`migrate`). If one of them is a grammar, declare its `documents` — a sequence with no
`documents` and no document step is read as owning tables.
  theatre.kit
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.