Function: runMigrations()
function runMigrations(
adapter,
migrations,
opts?
): Promise<MigrationRunReport>;
Defined in: migrate.ts:144
Runs every migration newer than the store's recorded version, in ascending order, recording each one as it lands so a crash resumes instead of restarting.
Throws RASD_STORAGE_MIGRATION on a downgrade, a malformed list, or a step
that fails — with the failing step's id in details, and with the ledger
left at the last successfully applied version.
Parameters
| Parameter | Type |
|---|---|
adapter | StorageAdapter |
migrations | readonly Migration[] |
opts | RunMigrationsOptions |
Returns
Promise<MigrationRunReport>