diff options
| author | soryu <soryu@soryu.co> | 2026-02-09 15:55:01 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-02-09 15:55:01 +0000 |
| commit | 339c1769379a851c4126021132573bd4b7994cf2 (patch) | |
| tree | 8a9a3cdc9d86b3dc2e6883853fb7b22c21dd9e99 /makima/src/db | |
| parent | bfa7bd8d7609397f570f1cd9b83d2269abc0ed63 (diff) | |
| download | soryu-339c1769379a851c4126021132573bd4b7994cf2.tar.gz soryu-339c1769379a851c4126021132573bd4b7994cf2.zip | |
Set directive env vars correctly for daemon
Diffstat (limited to 'makima/src/db')
| -rw-r--r-- | makima/src/db/repository.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/makima/src/db/repository.rs b/makima/src/db/repository.rs index 9dedc14..930a73e 100644 --- a/makima/src/db/repository.rs +++ b/makima/src/db/repository.rs @@ -5072,6 +5072,15 @@ pub async fn delete_directive_for_owner( owner_id: Uuid, id: Uuid, ) -> Result<bool, sqlx::Error> { + // Delete all tasks associated with this directive + sqlx::query( + r#"DELETE FROM tasks WHERE directive_id = $1 AND owner_id = $2"#, + ) + .bind(id) + .bind(owner_id) + .execute(pool) + .await?; + let result = sqlx::query( r#"DELETE FROM directives WHERE id = $1 AND owner_id = $2"#, ) |
