Delete blocked_builds entries when deleting derivations
This commit is contained in:
parent
5874c4ee37
commit
ebbcf36dc4
|
@ -385,6 +385,18 @@ DELETE FROM builds WHERE id IN ("
|
|||
(string-join build-ids ",")
|
||||
")")))))
|
||||
|
||||
(define (delete-blocked-builds-for-derivation-output-details-set
|
||||
conn
|
||||
derivation-output-details-set-id)
|
||||
(exec-query
|
||||
conn
|
||||
"
|
||||
DELETE FROM blocked_builds
|
||||
WHERE blocked_derivation_output_details_set_id = $1
|
||||
OR blocking_derivation_output_details_set_id = $2"
|
||||
(list derivation-output-details-set-id
|
||||
derivation-output-details-set-id)))
|
||||
|
||||
(define (delete-unreferenced-derivations-source-files conn)
|
||||
(exec-query
|
||||
conn
|
||||
|
@ -475,6 +487,10 @@ WHERE derivation_id = $1"
|
|||
conn
|
||||
derivation-output-details-set-id)
|
||||
|
||||
(delete-blocked-builds-for-derivation-output-details-set
|
||||
conn
|
||||
derivation-output-details-set-id)
|
||||
|
||||
(exec-query
|
||||
conn
|
||||
"
|
||||
|
|
Loading…
Reference in New Issue