export declare class MigrationDriftError extends Error { readonly file: string; readonly recordedHash: string; readonly currentHash: string | null; readonly appliedAt: string; constructor(file: string, recordedHash: string, currentHash: string | null, appliedAt: string, migrationsDir: string); } export interface MigrateResult { applied: string[]; skipped: string[]; } export interface AppliedMigration { name: string; hash: string; applied_at: string; } /** * Provider-agnostic migration executor. Implement this for each DB dialect. * Each method maps to a single DB operation; all file I/O and hashing lives * in the shared `migrate()` function above. */ export interface MigrationExecutor { ensureTrackingTable(): Promise; getApplied(): Promise; runMigration(sql: string, name: string, hash: string): Promise; } /** * Apply pending migrations from `migrationsDir/*.sql` using the supplied * executor. Hashes raw file bytes on apply; subsequent runs re-hash and bail * with `MigrationDriftError` if any applied file has changed on disk. */ export declare function migrate(executor: MigrationExecutor, migrationsDir: string): Promise;