Framework
MigrationContext
Interface: MigrationContext
Context passed to migration up/down functions.
Properties
| Property | Type | Description |
|---|---|---|
adapter | unknown | Get adapter for advanced operations. |
batch | <T>(items: T[], batchSize: number, fn: (batch) => Promise<void>) => Promise<void> | Process items in batches with progress reporting. |
model | <T>(name: string) => MigrationModelAccessor<T> | Access model for CRUD operations. Usage: ctx.model('user').findMany({ where: { ... } }) |
progress | (message: string) => void | Report progress to the user. |
raw | (operation: string) => Promise<void> | Execute a raw operation (advanced usage). Warning: This bypasses normal safeguards. |
