/**
 * Migration 091: Add feature_flag_collaboration column to settings table (spec 093).
 *
 * Adds a boolean (INTEGER 0/1) column for the agent collaboration &
 * supervision feature flag. Defaults to 0 (disabled) so existing
 * installations behave identically until the user opts in.
 */
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_collaboration')) {
        db.exec('ALTER TABLE settings ADD COLUMN feature_flag_collaboration 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;
}
