Strata · API
planMigrations
planMigrations compares prepared sequences with the rows of a database’s ledger and returns the applied version of each sequence, the pending migrations in the order they would run, and every problem found. It is a pure function: it runs no migration and queries no database. Here the ledger has 2 of the 3 migrations, so theatre.app/3 is pending.
{
id: 'theatre.app',
migrations: ['Shows', 'Bookings', 'Season passes'],
}[
{
sequence: 'theatre.app',
n: 1,
checksum: 'b0136f753b0752f6cbfd8ee738f0f9becfc9afbd5bff5f372112603d98444969',
description: 'Shows',
appliedAt: '2026-09-01T03:00:00Z',
},
{
sequence: 'theatre.app',
n: 2,
checksum: 'db5c8c8dc31eefb2a450f0915d96a5d592e73e067c8d7c7bffd5c3e5c74f2d99',
description: 'Bookings',
appliedAt: '2026-09-01T03:00:00Z',
},
]{
applied: { theatre.app: 2 },
pending: ['theatre.app/3'],
problems: [],
}Runs in this page on the installed package. The input and the expected output are defined by the example.