export interface MigrationEntry { version: string; name: string; sql: string; } /** Seed for the advisory lock — distinct from the SDK CMS/facts seeds. */ export declare const HORIZON_FACTS_LOCK_SEED = 4741702; /** * Migration versions OWNED BY THE GRAPH PROVIDER (HorizonDBGraphStore), not the * facts provider. The facts store filters these out of its run set; the graph * store runs them inline as part of its idempotent bootstrap. * 0003 — AGE extension + create_graph (the graph bootstrap). * 0013 — graph_namespaces registry sidecar (graph-fact-search enhancements). */ export declare const GRAPH_OWNED_MIGRATIONS: readonly ["0003", "0013"]; export declare const HORIZON_GLOBAL_DDL_LOCK_LABEL = "__horizon_facts_global_ddl__"; export declare const DEFAULT_MIGRATION_LOCK_TIMEOUT_MS = 60000; /** Whether a migration version is graph-owned (run by the graph store, not facts). */ export declare function isGraphOwnedMigration(version: string): boolean; /** Whether a migration contains database-global DDL that needs global serialization. */ export declare function migrationRequiresGlobalDdlLock(migration: Pick): boolean; /** * Run all pending migrations against the given schema. * * Uses a PostgreSQL advisory lock keyed on `lockSeed` + schema name to * serialize concurrent workers. Each migration runs in its own transaction. * Throws (never "repairs") when the migrations table records a version the * code does not know — a newer deployment owns this schema. */ export declare function runMigrations(pool: any, schema: string, migrations: MigrationEntry[], lockSeed: number): Promise; export declare function advisoryLockKeyParts(key: number): { classid: string; objid: string; }; /** Stable 32-bit hash of a schema name combined with a per-system seed. */ export declare function hashSchemaName(schema: string, seed: number): number; export interface MigrationTokens { schema: string; graphName: string; embeddingDim: number; /** Graph-owned schema for the namespace registry sidecar (0013). * Defaults to `${graphName}_registry`. */ registrySchema?: string; } /** Resolve the packaged migrations/ directory (works from src/ and dist/src/). */ export declare function migrationsDir(): string; /** Load the numbered migrations, token-substituted for this deployment. */ export declare function loadMigrations(tokens: MigrationTokens): MigrationEntry[]; //# sourceMappingURL=horizon-migrator.d.ts.map