From e12cccf71829c761a285ef31b4457c19c5c1b56b Mon Sep 17 00:00:00 2001 From: Christian Gick Date: Sat, 10 Jan 2026 09:48:08 +0200 Subject: [PATCH] fix: Add missing updated_at column to epics table epic_close was failing with "column updated_at does not exist". Migration adds the column with default NOW() and backfills existing rows from created_at. Co-Authored-By: Claude Opus 4.5 --- migrations/005_epics_updated_at.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 migrations/005_epics_updated_at.sql diff --git a/migrations/005_epics_updated_at.sql b/migrations/005_epics_updated_at.sql new file mode 100644 index 0000000..3cd006b --- /dev/null +++ b/migrations/005_epics_updated_at.sql @@ -0,0 +1,7 @@ +-- Migration 005: Add updated_at column to epics table +-- Fixes: epic_close error "column updated_at does not exist" + +ALTER TABLE epics ADD COLUMN IF NOT EXISTS updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(); + +-- Set existing rows to created_at value +UPDATE epics SET updated_at = created_at WHERE updated_at IS NULL;