From 847032d41ee4149d463b54e3ba618ac1a6287269 Mon Sep 17 00:00:00 2001 From: Gavriel Date: Sun, 1 Feb 2026 17:31:32 +0200 Subject: [PATCH] Fix task deletion FK constraint error Delete child records (task_run_logs) before parent (scheduled_tasks) to avoid foreign key constraint violation when cancelling tasks. Co-Authored-By: Claude Opus 4.5 --- src/db.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/db.ts b/src/db.ts index def0114..76984e2 100644 --- a/src/db.ts +++ b/src/db.ts @@ -175,8 +175,9 @@ export function updateTask(id: string, updates: Partial