Strata · Migrations
Marker migrations
A migration with steps: [] is a marker: it increments the grammar’s version without transforming any document. Use it to record an addition to a strict grammar. Code that has the marker reads an older document unchanged, and code from before it rejects a document stamped after it with TOO_NEW, where it would otherwise have met an unknown key.
{ description: 'A button may carry an icon', steps: [] }{ text: 'Book seats' }{ theatre.buttons: 1 }{
document: { text: 'Book seats' },
stamp: { theatre.buttons: 2 },
applied: ['theatre.buttons/2'],
}Runs in this page on the installed package. The input and the expected output are defined by the example.