Strata · API

prepare

prepare parses each sequence, numbers its migrations from 1 and computes the checksum of each migration’s steps. The grammar field of each prepared sequence is false for a sequence that owns tables and true for one that owns documents. Planning (planMigrations) and upgrading (createUpgrader) both work from prepared sequences.

Sequence (descriptions only)
{
  id: 'theatre.app',
  migrations: ['Shows', 'Bookings', 'Season passes'],
}
Output
[
  {
    id: 'theatre.app',
    grammar: false,
    migrations: [
      {
        ref: 'theatre.app/1',
        description: 'Shows',
        checksum: 'b0136f753b0752f6cbfd8ee738f0f9becfc9afbd5bff5f372112603d98444969',
      },
      {
        ref: 'theatre.app/2',
        description: 'Bookings',
        checksum: 'db5c8c8dc31eefb2a450f0915d96a5d592e73e067c8d7c7bffd5c3e5c74f2d99',
      },
      {
        ref: 'theatre.app/3',
        description: 'Season passes',
        checksum: '1c4f97e8b1cd64f052bd05eab5000f3bbfd02c93e57f2791a3e517b8b69659f8',
      },
    ],
  },
]
Output matches the expected value

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