/**
 * Auto-migrate module with PostgreSQL advisory lock for HA safety.
 *
 * Uses pg_advisory_lock to ensure only one orchestrator instance runs
 * migrations at a time, preventing conflicts in multi-instance deployments.
 */
import { type MigrationResult } from 'kysely/migration';
import type { Kysely } from 'kysely';
import type pg from 'pg';
interface MigrateOptions {
    db: Kysely<any>;
    pool: pg.Pool;
}
interface MigrationStatusEntry {
    name: string;
    status: 'applied' | 'pending';
    appliedAt?: Date;
}
/**
 * Run all pending migrations with an advisory lock for concurrency safety.
 *
 * Acquires pg_advisory_lock before migrating to prevent concurrent
 * migration attempts from multiple orchestrator instances. The lock
 * is always released in the finally block, even on error.
 */
export declare function runMigrations(opts: MigrateOptions): Promise<MigrationResult[]>;
/**
 * Get migration status (applied/pending) without running anything.
 */
export declare function getMigrationStatus(opts: MigrateOptions): Promise<MigrationStatusEntry[]>;
export {};
//# sourceMappingURL=migrator.d.ts.map