/** * M-split-graph — Nexus DB topology split migration (T9150 ADR-072). * * Migrates from a single `nexus.db` to two file families: * - `nexus-registry.db` (global, registry + metadata tables) * - `nexus-graph/.db` (per-project, nodes + relations) * * This migration is IDEMPOTENT: running it twice is safe. * If `nexus-version.json` shows `topology: "split"`, this is a no-op. * * ROLLBACK: pass `rollback: true` to re-merge back into a single `nexus.db`. * * @task T9150 * @see ADR-072 docs/adr/ADR-072-nexus-db-split.md */ export interface SplitMigrationOptions { /** Path to `nexus.db` (default: `/nexus.db`). */ nexusDbPath?: string; /** Perform a dry-run scan only — no file writes. */ dryRun?: boolean; } export interface SplitMigrationResult { status: 'already-split' | 'migrated' | 'dry-run'; projectCount: number; legacyFile?: string; durationMs: number; } /** * Execute the nexus DB split migration (ADR-072). * * Steps: * 1. Check nexus-version.json — skip if already split. * 2. Create nexus-registry.db and copy registry tables. * 3. For each project in project_registry, create nexus-graph/.db * and copy nexus_nodes + nexus_relations + nexus_contracts. * 4. Rename nexus.db → nexus.db.legacy.. * 5. Write nexus-version.json {topology: "split", migratedAt, legacyFile}. */ export declare function migrateToSplit(opts?: SplitMigrationOptions): Promise; export interface RollbackOptions { /** Force rollback even if version file doesn't indicate split topology. */ force?: boolean; } export interface RollbackResult { status: 'rolled-back' | 'not-split' | 'no-legacy-file'; durationMs: number; } /** * Roll back the nexus DB split — re-merges into a single `nexus.db`. * * Reads `legacyFile` from `nexus-version.json` and copies it back. * Then deletes `nexus-registry.db` and `nexus-graph/`. */ export declare function rollbackSplit(opts?: RollbackOptions): Promise; //# sourceMappingURL=M-split-graph.d.ts.map