1 package AlleleCascades
;
3 extends
'CXGN::Metadata::Dbpatch';
5 has
'+description' => ( default => <<'' );
6 Adding cascading
delete to some unique constraints on stock_allele
and allele tables
.
16 shift->dbh->do(<<EOSQL);
18 SET search_path=phenome,public;
20 ALTER TABLE stock_allele
21 DROP CONSTRAINT stock_allele_allele_id_fkey,
22 DROP CONSTRAINT stock_allele_stock_id_fkey;
24 ALTER TABLE stock_allele
25 ADD CONSTRAINT stock_allele_allele_id_fkey
26 FOREIGN KEY (allele_id)
27 REFERENCES phenome.allele(allele_id)
29 ADD CONSTRAINT stock_allele_stock_id_fkey
30 FOREIGN KEY (stock_id)
31 REFERENCES stock(stock_id)
35 DROP CONSTRAINT allele_locus_id_fkey;
38 ADD CONSTRAINT allele_locus_id_fkey
39 FOREIGN KEY (locus_id)
40 REFERENCES locus(locus_id)