3 INSERT INTO config.upgrade_log (version) VALUES ('0186'); -- Scott McKellar
5 ALTER TABLE acq.distribution_formula_application
6 DROP CONSTRAINT distribution_formula_application_lineitem_fkey;
8 ALTER TABLE acq.distribution_formula_application
9 ADD FOREIGN KEY (lineitem) REFERENCES acq.lineitem( id )
11 DEFERRABLE INITIALLY DEFERRED;
13 ALTER TABLE acq.lineitem_attr
14 DROP CONSTRAINT lineitem_attr_lineitem_fkey;
16 ALTER TABLE acq.lineitem_attr
17 ADD FOREIGN KEY (lineitem) REFERENCES acq.lineitem( id )
19 DEFERRABLE INITIALLY DEFERRED;
21 ALTER TABLE acq.lineitem_detail
22 DROP CONSTRAINT lineitem_detail_lineitem_fkey;
24 ALTER TABLE acq.lineitem_detail
25 ADD FOREIGN KEY (lineitem) REFERENCES acq.lineitem( id )
27 DEFERRABLE INITIALLY DEFERRED;
29 ALTER TABLE acq.lineitem_note
30 DROP CONSTRAINT lineitem_note_lineitem_fkey;
32 ALTER TABLE acq.lineitem_note
33 ADD FOREIGN KEY (lineitem) REFERENCES acq.lineitem( id )
35 DEFERRABLE INITIALLY DEFERRED;