import type { SqliteDatabase } from './adapter.js'; export interface MigrationResult { applied: number[]; currentVersion: number; } export interface MigrationPlan { readonly applied: readonly number[]; readonly pending: readonly number[]; readonly databaseVersion: number; readonly currentVersion: number; readonly migrations: readonly MigrationSource[]; } export interface MigrationIdentity { readonly version: number; readonly name: string; } export interface MigrationSource extends MigrationIdentity { readonly checksum: string; readonly sql: string; } export interface MigrationSnapshot { readonly migrations: readonly MigrationSource[]; } export interface MigrationHooks { /** * Runs after a pending migration's SQL and before its schema marker is * written. The hook is inside the same SQLite transaction as both steps. */ readonly beforeMarkApplied?: (database: SqliteDatabase, migration: MigrationIdentity) => void; } export declare function defaultMigrationsDirectory(): string; export declare function loadMigrationSnapshot(directory?: string): MigrationSnapshot; export declare function inspectMigrationSnapshot(database: SqliteDatabase, snapshot: MigrationSnapshot): MigrationPlan; /** Apply an already-loaded migration snapshot inside a transaction owned by the caller. */ export declare function migrateDatabaseSnapshotInTransaction(database: SqliteDatabase, snapshot: MigrationSnapshot, hooks?: MigrationHooks): MigrationResult; export declare function migrateDatabase(database: SqliteDatabase, directory?: string, hooks?: MigrationHooks): MigrationResult; //# sourceMappingURL=migrate.d.ts.map