-- SQLite doesn't support DROP COLUMN before 3.35.0; recreate the table
-- without the new columns. This is only needed for rollback.
CREATE TABLE photo_insights_old AS
    SELECT id, library_id, rel_path, title, summary, generated_at,
           model_version, is_current, training_messages, approved,
           backend, fewshot_source_ids, content_hash
    FROM photo_insights;

DROP TABLE photo_insights;

ALTER TABLE photo_insights_old RENAME TO photo_insights;
