-- SQLite doesn't support DROP COLUMN directly, so we recreate the table
CREATE TABLE photo_insights_backup AS SELECT id, file_path, title, summary, generated_at, model_version, is_current FROM photo_insights;
DROP TABLE photo_insights;
CREATE TABLE photo_insights (
    id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    file_path TEXT NOT NULL,
    title TEXT NOT NULL,
    summary TEXT NOT NULL,
    generated_at BIGINT NOT NULL,
    model_version TEXT NOT NULL,
    is_current BOOLEAN NOT NULL DEFAULT TRUE
);
INSERT INTO photo_insights SELECT * FROM photo_insights_backup;
DROP TABLE photo_insights_backup;
