/**
 * Database Migration Tool
 *
 * Manages schema migrations for SQLite database:
 * - Version tracking
 * - Up/down migrations
 * - Migration history
 * - Rollback support
 */
export interface Migration {
    version: number;
    name: string;
    up: string;
    down: string;
    appliedAt?: Date;
}
export interface MigrationHistory {
    version: number;
    name: string;
    appliedAt: Date;
    checksum: string;
}
export interface MigrationResult {
    success: boolean;
    migrationsApplied: number;
    currentVersion: number;
    error?: string;
}
export interface MigrationConfig {
    /** Database path */
    dbPath?: string;
    /** Migrations directory */
    migrationsDir?: string;
    /** Table name for tracking migrations */
    tableName?: string;
}
/**
 * Database Migration Manager
 */
export declare class MigrationManager {
    private config;
    private db;
    private migrations;
    private vfs;
    constructor(config?: MigrationConfig);
    /**
     * Initialize migration system
     */
    initialize(): Promise<void>;
    /**
     * Load migrations from file system
     */
    private loadMigrationsFromDir;
    /**
     * Get current database version
     */
    getCurrentVersion(): number;
    /**
     * Get pending migrations
     */
    getPendingMigrations(): Migration[];
    /**
     * Get applied migrations
     */
    getAppliedMigrations(): MigrationHistory[];
    /**
     * Apply all pending migrations
     */
    migrate(): MigrationResult;
    /**
     * Apply a single migration
     */
    private applyMigration;
    /**
     * Rollback last migration
     */
    rollback(): MigrationResult;
    /**
     * Rollback to specific version
     */
    rollbackTo(targetVersion: number): MigrationResult;
    /**
     * Create a new migration file
     */
    createMigration(name: string): Promise<string>;
    /**
     * Get migration status
     */
    getStatus(): {
        currentVersion: number;
        latestVersion: number;
        pendingCount: number;
        appliedCount: number;
        pending: Migration[];
        applied: MigrationHistory[];
    };
    /**
     * Format migration status for display
     */
    formatStatus(): string;
    /**
     * Compute checksum for migration SQL
     */
    private computeChecksum;
    /**
     * Close database connection
     */
    close(): void;
}
/**
 * Get or create migration manager
 */
export declare function getMigrationManager(config?: MigrationConfig): MigrationManager;
/**
 * Initialize and run pending migrations
 */
export declare function runMigrations(config?: MigrationConfig): Promise<MigrationResult>;
export default MigrationManager;
