diff options
author | Christopher Baines <mail@cbaines.net> | 2022-06-16 12:38:51 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2022-06-16 12:38:51 +0100 |
commit | 754f64718f23a73ca5878eae81f541e72b42027d (patch) | |
tree | 2b63ad6b9eefbba42ee506510338faf94f81396f | |
parent | be45e4251e2e2d4ad2666f25e0d884121bd85ffd (diff) | |
download | data-service-754f64718f23a73ca5878eae81f541e72b42027d.tar data-service-754f64718f23a73ca5878eae81f541e72b42027d.tar.gz |
Fix DELETE query in delete-revisions-from-branch
-rw-r--r-- | guix-data-service/data-deletion.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/guix-data-service/data-deletion.scm b/guix-data-service/data-deletion.scm index 5ade50f..7e319c7 100644 --- a/guix-data-service/data-deletion.scm +++ b/guix-data-service/data-deletion.scm @@ -212,8 +212,12 @@ WHERE id IN ( conn " DELETE FROM package_derivations_by_guix_revision_range -WHERE git_repository_id = $1 AND - branch_name = $2" +WHERE git_branch_id IN ( + SELECT id + FROM git_branches + WHERE git_repository_id = $1 AND + name = $2 +)" (list (number->string git-repository-id) branch-name)) |