import type { BaseDatabase } from '../database';
import { type LoggerInterface } from '../../services/logger';
export * from './create';
export * from './maintenance';
export type MigrationFunction<T extends BaseDatabase = BaseDatabase> = (db: T) => Promise<void> | void;
export interface Migration<T extends BaseDatabase = BaseDatabase> {
    name: string;
    up: MigrationFunction<T>;
}
export interface MigrationExecution {
    name: string;
    executedAt: Date;
    durationMs: number;
}
export interface MigrationRunOptions<T extends BaseDatabase = BaseDatabase> {
    beforeRun?: MigrationFunction<T>;
}
export declare function createMigration<T extends BaseDatabase>(fn: MigrationFunction<T>): MigrationFunction<T>;
export declare function defineMigration<T extends BaseDatabase>(name: string, up: MigrationFunction<T>): Migration<T>;
export declare class MigrationRunner<T extends BaseDatabase = BaseDatabase> {
    readonly db: T;
    readonly tableName: string;
    private readonly logger;
    constructor(db: T, tableName?: string, logger?: LoggerInterface);
    run(migrations: readonly Migration<T>[], options?: MigrationRunOptions<T>): Promise<MigrationExecution[]>;
    getExecutedMigrationNames(): Promise<string[]>;
    createMigrationsTableIfNotExists(): Promise<void>;
    private recordMigration;
}
export declare function runMigrations<T extends BaseDatabase>(db: T, migrations: readonly Migration<T>[], options?: MigrationRunOptions<T>): Promise<MigrationExecution[]>;
export declare function loadMigrationsFromDirectory<T extends BaseDatabase = BaseDatabase>(directory: string): Promise<Migration<T>[]>;
export declare function runMigrationsFromDirectory<T extends BaseDatabase>(db: T, directory: string): Promise<MigrationExecution[]>;
//# sourceMappingURL=index.d.ts.map