MigrationScript
TypeExperimentalSignature
type MigrationScript<TMode> = (context) => ModeResult<TMode, void>;packages-internal/typed-sql/src/migrator.ts:25
A free-form migration script: the up and down of a non-transactional migration, and the
migrator's before and after scripts. It runs outside a transaction and brings its
own database access. Call assertLockHeld between steps of long work; it throws once the
migration lease is lost, so the script stops before another process starts migrating.
Type Parameters
- TModeextends
Modedefault"async"
Parameters
- context
object - context.assertLockHeld(
) => void
Returns
ModeResult<TMode,void>