/** * Legacy Migration Bridge (v0-7) * * Purpose: Handles migration from TypeScript-based migrations to SQL-based migrations * * Features: * - Detects databases using old migration system (PRAGMA user_version only) * - Applies appropriate schema updates based on current version * - Syncs state to new migration tracking system * - Ensures smooth transition with zero data loss * * Supported Legacy Versions: * - v0: Base schema or unversioned database * - v1-7: Various column additions and features * * After running legacy migrations, database will be at v7 and ready for new SQL migrations (v8+) * * Implementation: * - 2025-11-02: Initial implementation for migration system transition */ import type { Database } from 'sqlite3'; /** * Check if database is using legacy migration system * Legacy databases have PRAGMA user_version but no schema_migrations table */ export declare function isLegacyDatabase(db: Database): Promise; /** * Get current version from PRAGMA user_version */ export declare function getLegacyVersion(db: Database): Promise; /** * Apply legacy migrations to bring database from v0-7 to v7 * This replicates the old TypeScript migration logic */ export declare function applyLegacyMigrations(db: Database): Promise; /** * Sync legacy database to new migration tracking system * Creates schema_migrations table and records that v1-7 have been applied */ export declare function syncToNewMigrationSystem(db: Database): Promise; /** * Main function to handle legacy migration and sync */ export declare function migrateLegacyDatabase(db: Database): Promise; //# sourceMappingURL=legacy-migrations.d.ts.map