feat(coderd): use new data model for task delete (#20334)

Updates coder/internal#976
This commit is contained in:
Mathias Fredriksson
2025-10-23 19:45:18 +03:00
committed by GitHub
parent 79728c30fa
commit 9855460524
16 changed files with 355 additions and 102 deletions
+9
View File
@@ -47,3 +47,12 @@ WHERE tws.deleted_at IS NULL
AND CASE WHEN @owner_id::UUID != '00000000-0000-0000-0000-000000000000' THEN tws.owner_id = @owner_id::UUID ELSE TRUE END
AND CASE WHEN @organization_id::UUID != '00000000-0000-0000-0000-000000000000' THEN tws.organization_id = @organization_id::UUID ELSE TRUE END
ORDER BY tws.created_at DESC;
-- name: DeleteTask :one
UPDATE tasks
SET
deleted_at = @deleted_at::timestamptz
WHERE
id = @id::uuid
AND deleted_at IS NULL
RETURNING *;