Mathias Fredriksson
c60c373bc9
fix(coderd): clean up task snapshots on task deletion ( #21949 )
...
Task snapshots were orphaned when tasks were soft-deleted. The
`task_snapshots` table has an `ON DELETE CASCADE` foreign key, but
that only fires on hard deletes.
Modified DeleteTask to use a CTE that atomically soft-deletes the
task and removes its snapshot in a single transaction. The query now
returns just the task UUID instead of the full row.
Closes coder/internal#1283
2026-02-06 11:55:33 +02:00
..
2025-08-20 12:19:14 +01:00
2025-12-03 09:37:18 +00:00
2025-12-02 15:41:38 +00:00
2025-12-02 16:50:09 +02:00
2026-02-02 09:11:54 -07:00
2025-12-02 14:17:52 +00:00
2024-09-26 21:01:49 +01:00
2023-09-15 15:09:40 +01:00
2025-08-14 09:50:31 -05:00
2025-04-01 15:47:30 -06:00
2022-10-14 16:25:46 -05:00
2025-03-25 12:18:06 +00:00
2025-08-07 10:14:58 -06:00
2025-12-09 15:21:16 -08:00
2025-08-30 03:39:37 +10:00
2023-06-25 13:17:00 +00:00
2025-03-27 10:03:53 +00:00
2025-03-20 13:41:54 +01:00
2025-07-03 18:33:47 +02:00
2025-09-30 23:54:21 +01:00
2026-01-14 09:47:50 -08:00
2023-06-02 11:16:46 +02:00
2025-11-20 17:12:25 +01:00
2025-11-20 17:12:25 +01:00
2025-10-07 13:10:38 +00:00
2025-10-07 13:10:38 +00:00
2026-02-03 10:42:17 +02:00
2025-10-07 13:10:38 +00:00
2023-11-21 11:21:25 +00:00
2024-11-05 08:12:56 -06:00
2022-04-01 15:45:23 -05:00
2023-07-27 02:21:04 +10:00
2026-01-12 18:19:19 -08:00
2025-07-02 15:05:42 +00:00
2026-01-26 14:27:17 +04:00
2026-02-06 11:55:33 +02:00
2025-01-31 13:55:46 +01:00
2025-10-28 03:16:41 +11:00
2026-02-05 14:38:55 -06:00
2025-05-29 08:55:19 -05:00
2025-08-19 10:29:51 +02:00
2025-05-14 12:21:36 -05:00
2025-12-12 11:41:46 +00:00
2024-05-20 13:30:19 +00:00
2025-10-07 13:10:38 +00:00
2025-08-30 03:39:37 +10:00
2024-11-21 13:04:00 -06:00
2025-08-07 15:58:59 -04:00
2026-02-03 00:13:41 +11:00
2026-01-30 17:19:19 +00:00
2024-03-06 09:23:57 -05:00
2025-03-03 18:41:01 +01:00
2026-02-04 15:33:48 +00:00
2025-12-09 15:19:55 -08:00
2025-03-20 14:10:45 +00:00
2025-12-04 17:56:13 +02:00
2023-08-16 15:22:00 +03:00
2025-06-24 13:06:02 +02:00
2025-11-07 12:45:45 +02:00
2024-11-16 21:56:19 +01:00
2024-11-16 21:56:19 +01:00
2026-02-04 20:48:27 -06:00
2024-09-24 10:51:49 +01:00