Define a migration that stages structural changes in a Transaction. A failure of run rejects db.runMigrations and commits nothing.
run
db.runMigrations
const migration = Migration.defineTransaction((transaction) => Effect.sync(() => transaction.delete(legacyId)),);await db.runMigrations([migration]); Copy
const migration = Migration.defineTransaction((transaction) => Effect.sync(() => transaction.delete(legacyId)),);await db.runMigrations([migration]);
O(1) at definition time.
Define a migration that stages structural changes in a Transaction. A failure of
runrejectsdb.runMigrationsand commits nothing.