Implement proper schema migrations for ALTER TABLE

t-152.3·WorkTask·
·
·
·Omni/Jr.hs
Parent:t-152·Created3 months ago·Updated3 months ago

Description

Edit

CREATE TABLE IF NOT EXISTS doesn't add new columns to existing tables.

When we added amp_thread_url, started_at, completed_at, cost_cents, tokens_used to task_activity, existing DBs didn't get the columns.

Options: 1. Check for missing columns and ALTER TABLE on startup 2. Track schema version, run migration scripts 3. Drop and recreate tables (loses data - bad)

For now, manually ran ALTER TABLE commands. Need proper solution.

Timeline (0)

No activity yet.