From 41eeba5918dffaa422f205e5ae58dc665d4b3222 Mon Sep 17 00:00:00 2001 From: Alex Netsch Date: Tue, 14 Oct 2025 16:27:42 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"Perfect!=20All=20tasks=20have=20been?= =?UTF-8?q?=20completed=20successfully.=20Here's=20a=20summary=E2=80=A6"?= =?UTF-8?q?=20(#1010)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 76b0142085e0e2860d2e85c163f7b0fd377d757f. --- ...cded85605ee540150972e2a8364919f56d5c0.json | 8 ++--- ...set_null_parent_task_attempt_on_delete.sql | 32 ------------------- 2 files changed, 4 insertions(+), 36 deletions(-) delete mode 100644 crates/db/migrations/20251007000000_set_null_parent_task_attempt_on_delete.sql diff --git a/crates/db/.sqlx/query-01a0f9724e5fce7d3312a742e72cded85605ee540150972e2a8364919f56d5c0.json b/crates/db/.sqlx/query-01a0f9724e5fce7d3312a742e72cded85605ee540150972e2a8364919f56d5c0.json index 9971636d..26076bd5 100644 --- a/crates/db/.sqlx/query-01a0f9724e5fce7d3312a742e72cded85605ee540150972e2a8364919f56d5c0.json +++ b/crates/db/.sqlx/query-01a0f9724e5fce7d3312a742e72cded85605ee540150972e2a8364919f56d5c0.json @@ -46,12 +46,12 @@ { "name": "has_in_progress_attempt!: i64", "ordinal": 8, - "type_info": "Integer" + "type_info": "Null" }, { "name": "last_attempt_failed!: i64", "ordinal": 9, - "type_info": "Integer" + "type_info": "Null" }, { "name": "executor!: String", @@ -71,8 +71,8 @@ true, false, false, - false, - false, + null, + null, true ] }, diff --git a/crates/db/migrations/20251007000000_set_null_parent_task_attempt_on_delete.sql b/crates/db/migrations/20251007000000_set_null_parent_task_attempt_on_delete.sql deleted file mode 100644 index 7c626cd8..00000000 --- a/crates/db/migrations/20251007000000_set_null_parent_task_attempt_on_delete.sql +++ /dev/null @@ -1,32 +0,0 @@ -PRAGMA foreign_keys = OFF; - --- Create new tasks table with updated foreign key constraint -CREATE TABLE tasks_new ( - id BLOB PRIMARY KEY, - project_id BLOB NOT NULL, - title TEXT NOT NULL, - description TEXT, - status TEXT NOT NULL DEFAULT 'todo' - CHECK (status IN ('todo','inprogress','done','cancelled','inreview')), - parent_task_attempt BLOB, - created_at TEXT NOT NULL DEFAULT (datetime('now', 'subsec')), - updated_at TEXT NOT NULL DEFAULT (datetime('now', 'subsec')), - FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE, - FOREIGN KEY (parent_task_attempt) REFERENCES task_attempts(id) ON DELETE SET NULL -); - --- Copy data from old table to new table -INSERT INTO tasks_new (id, project_id, title, description, status, parent_task_attempt, created_at, updated_at) -SELECT id, project_id, title, description, status, parent_task_attempt, created_at, updated_at -FROM tasks; - --- Drop old table -DROP TABLE tasks; - --- Rename new table to original name -ALTER TABLE tasks_new RENAME TO tasks; - --- Recreate index for parent_task_attempt lookups -CREATE INDEX idx_tasks_parent_task_attempt ON tasks(parent_task_attempt); - -PRAGMA foreign_keys = ON;