From 6a2f9c6d574fb8b9e1a5131af0b139aaa7783f95 Mon Sep 17 00:00:00 2001 From: Lukas May Date: Fri, 6 Mar 2026 11:20:05 +0100 Subject: [PATCH] migration: Drop orphaned approval columns from initiatives and tasks merge_requires_approval (initiatives) and requires_approval (tasks) were removed from schema.ts in the task-approval removal but left in the DB because 0030 assumed SQLite couldn't DROP COLUMN. SQLite 3.35+ supports it. These orphaned columns caused the old stale-build approval code path to silently set detail tasks to pending_approval, stranding them and blocking phase completion. --- apps/server/drizzle/0033_drop_approval_columns.sql | 5 +++++ apps/server/drizzle/meta/_journal.json | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 apps/server/drizzle/0033_drop_approval_columns.sql diff --git a/apps/server/drizzle/0033_drop_approval_columns.sql b/apps/server/drizzle/0033_drop_approval_columns.sql new file mode 100644 index 0000000..ea73e34 --- /dev/null +++ b/apps/server/drizzle/0033_drop_approval_columns.sql @@ -0,0 +1,5 @@ +-- Drop orphaned approval columns left behind by 0030_remove_task_approval. +-- These columns were removed from schema.ts but left in the DB because +-- 0030 assumed SQLite couldn't DROP COLUMN. SQLite 3.35+ supports it. +ALTER TABLE initiatives DROP COLUMN merge_requires_approval;--> statement-breakpoint +ALTER TABLE tasks DROP COLUMN requires_approval; diff --git a/apps/server/drizzle/meta/_journal.json b/apps/server/drizzle/meta/_journal.json index 96636a8..2c92726 100644 --- a/apps/server/drizzle/meta/_journal.json +++ b/apps/server/drizzle/meta/_journal.json @@ -232,6 +232,13 @@ "when": 1772323200000, "tag": "0032_add_comment_threading", "breakpoints": true + }, + { + "idx": 33, + "version": "6", + "when": 1772409600000, + "tag": "0033_drop_approval_columns", + "breakpoints": true } ] } \ No newline at end of file