import type Database from "better-sqlite3";
export interface Migration {
    version: number;
    name: string;
    up: (db: Database.Database) => void;
}
/**
 * Runs all pending migrations in order.
 * Each migration runs inside a transaction for atomicity.
 * Logs progress and handles failures gracefully.
 */
export declare function runMigrations(db: Database.Database, migrations: Migration[]): void;
/**
 * Returns the current schema version from the _migrations table,
 * or falls back to user_version pragma.
 */
export declare function getSchemaVersion(db: Database.Database): number;
/**
 * Returns all applied migrations.
 */
export declare function getAppliedMigrations(db: Database.Database): {
    version: number;
    name: string;
    applied_at: string;
}[];
//# sourceMappingURL=migrator.d.ts.map