/**
 * Migration 042: Add feature_flag_git_rebase_sync column to settings table.
 *
 * Adds a boolean (INTEGER 0/1) column for the git rebase-sync feature flag.
 * Defaults to 0 (disabled).
 */
export async function up({ context: db }) {
    const columns = db.pragma('table_info(settings)');
    const existing = new Set(columns.map((c) => c.name));
    if (!existing.has('feature_flag_git_rebase_sync')) {
        db.exec('ALTER TABLE settings ADD COLUMN feature_flag_git_rebase_sync INTEGER NOT NULL DEFAULT 0');
    }
}
export async function down({ context: db }) {
    // SQLite does not support DROP COLUMN before 3.35.0; column remains but is unused after rollback.
    void db;
}
