1 -- Drop the never-used column item_count from acq.lineitem.
2 -- Drop it also from the associated history table, and rebuild
3 -- the function that maintains it. Finally, rebuild the
4 -- associated lifecycle view.
6 -- Apply to trunk only; this column never existed in 2.0.
10 INSERT INTO config.upgrade_log (version) VALUES ('0417'); -- Scott McKellar
12 -- Have to drop the view first, because it's a dependent
13 DROP VIEW IF EXISTS acq.acq_lineitem_lifecycle;
15 ALTER TABLE acq.lineitem DROP COLUMN item_count;
17 ALTER TABLE acq.acq_lineitem_history DROP COLUMN item_count;
19 SELECT acq.create_acq_func( 'acq', 'lineitem' );
21 SELECT acq.create_acq_lifecycle( 'acq', 'lineitem' );