import type { Knex } from 'knex'; import type { Database } from '..'; import type { MigrationFileBuilder } from './file-builder'; export interface UserMigrationProvider { shouldRun(): Promise; up(): Promise; down(): Promise; } export interface InternalMigrationProvider { register(migration: Migration): void; shouldRun(): Promise; up(): Promise; down(): Promise; } export interface MigrationProvider { providers: { internal: InternalMigrationProvider; }; createFileBuilder(): MigrationFileBuilder; shouldRun(): Promise; up(): Promise; down(): Promise; } export type Context = { db: Database; }; export type MigrationResolverParams = { name: string; path?: string; context: Context; }; export type MigrationRunnerFn = () => Promise | Promise>; export type MigrationResolver = (params: MigrationResolverParams) => { name: string; path?: string; up: MigrationRunnerFn; down: MigrationRunnerFn; }; export type MigrationFn = (knex: Knex.Transaction, db: Database) => Promise; export type Migration = { name: string; up: MigrationFn; down: MigrationFn; }; export declare const wrapTransaction: (db: Database) => (fn: MigrationFn) => () => Promise>; //# sourceMappingURL=common.d.ts.map