From 9f07cc9080343d3df4f9f521e747d5a07d26c641 Mon Sep 17 00:00:00 2001 From: Roei Erez Date: Mon, 30 Mar 2026 15:09:08 +0300 Subject: [PATCH] move archived_at addition before it is used --- src/server/db/database.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/db/database.ts b/src/server/db/database.ts index 999e9ca..f7d4f39 100644 --- a/src/server/db/database.ts +++ b/src/server/db/database.ts @@ -48,6 +48,9 @@ export function initDb(dbPath: string): DatabaseSync { if (!jobCols.includes('use_worktree')) { db.exec('ALTER TABLE jobs ADD COLUMN use_worktree INTEGER NOT NULL DEFAULT 0'); } + if (!jobCols.includes('archived_at')) { + db.exec('ALTER TABLE jobs ADD COLUMN archived_at INTEGER'); + } // Projects table db.exec(` @@ -309,9 +312,6 @@ export function initDb(dbPath: string): DatabaseSync { if (!jobCols.includes('review_parent_job_id')) { db.exec('ALTER TABLE jobs ADD COLUMN review_parent_job_id TEXT'); } - if (!jobCols.includes('archived_at')) { - db.exec('ALTER TABLE jobs ADD COLUMN archived_at INTEGER'); - } if (!jobCols.includes('created_by_agent_id')) { db.exec('ALTER TABLE jobs ADD COLUMN created_by_agent_id TEXT'); }