aboutsummaryrefslogtreecommitdiff
path: root/sqitch/deploy/change_derivation_source_file_nars_constraint.sql
blob: b8e96a21a8a311a962424038f278779800318b04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- Deploy guix-data-service:change_derivation_source_file_nars_constraint to pg

BEGIN;

ALTER TABLE derivation_source_file_nars
  DROP CONSTRAINT derivation_source_file_nars_derivation_source_file_id_fkey;

ALTER TABLE derivation_source_file_nars
  ADD CONSTRAINT derivation_source_file_nars_derivation_source_file_id_fkey
  FOREIGN KEY (derivation_source_file_id) REFERENCES derivation_source_files(id)
  ON DELETE CASCADE;

COMMIT;