Remove odd package derivations with mismatched systems
This follows on from 79993bfaef, disassociating
the relevant derivations from the revisions.
This commit is contained in:
parent
79993bfaef
commit
111576e3f9
4 changed files with 38 additions and 0 deletions
23
sqitch/deploy/remove_odd_package_derivations.sql
Normal file
23
sqitch/deploy/remove_odd_package_derivations.sql
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
-- Deploy guix-data-service:remove_odd_package_derivations to pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
DELETE FROM guix_revision_package_derivations
|
||||
WHERE package_derivation_id IN (
|
||||
SELECT package_derivations.id
|
||||
FROM package_derivations
|
||||
INNER JOIN derivations
|
||||
ON package_derivations.derivation_id = derivations.id
|
||||
WHERE package_derivations.system != derivations.system
|
||||
);
|
||||
|
||||
DELETE FROM package_derivations
|
||||
WHERE id IN (
|
||||
SELECT package_derivations.id
|
||||
FROM package_derivations
|
||||
INNER JOIN derivations
|
||||
ON package_derivations.derivation_id = derivations.id
|
||||
WHERE package_derivations.system != derivations.system
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
7
sqitch/revert/remove_odd_package_derivations.sql
Normal file
7
sqitch/revert/remove_odd_package_derivations.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-- Revert guix-data-service:remove_odd_package_derivations from pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
-- XXX Add DDLs here.
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -56,3 +56,4 @@ guix_revision_system_test_derivations_add_system 2020-03-19T21:30:33Z Christophe
|
|||
drop_package_versions_by_guix_revision_range 2020-03-24T20:40:38Z Christopher Baines <mail@cbaines.net> # Drop package_versions_by_guix_revision_range
|
||||
create_narinfo_fetch_records_index 2020-03-25T19:07:28Z Christopher Baines <mail@cbaines.net> # Create an index on narinfo_fetch_records
|
||||
load_new_guix_revision_jobs_make_commits_unique 2020-03-27T21:38:42Z Christopher Baines <mail@cbaines.net> # Make load_new_guix_revision_jobs commits unique
|
||||
remove_odd_package_derivations 2020-04-24T20:36:06Z Christopher Baines <mail@cbaines.net> # Remove odd package derivations
|
||||
|
|
|
|||
7
sqitch/verify/remove_odd_package_derivations.sql
Normal file
7
sqitch/verify/remove_odd_package_derivations.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-- Verify guix-data-service:remove_odd_package_derivations on pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
-- XXX Add verifications here.
|
||||
|
||||
ROLLBACK;
|
||||
Loading…
Add table
Add a link
Reference in a new issue