[open-ils-commits] r18071 - in branches/rel_2_0/Open-ILS/src/sql/Pg: . upgrade (scottmk)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Sep 28 01:13:30 EDT 2010


Author: scottmk
Date: 2010-09-28 01:13:27 -0400 (Tue, 28 Sep 2010)
New Revision: 18071

Added:
   branches/rel_2_0/Open-ILS/src/sql/Pg/upgrade/0422.schema.acq.lineitem-history-bigint.sql
Modified:
   branches/rel_2_0/Open-ILS/src/sql/Pg/002.schema.config.sql
Log:
Turn an int into a bigint in acq.acq_lineitem_history, following up on
a similar change to acq.lineitem.

M    Open-ILS/src/sql/Pg/002.schema.config.sql
A    Open-ILS/src/sql/Pg/upgrade/0422.schema.acq.lineitem-history-bigint.sql


Modified: branches/rel_2_0/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- branches/rel_2_0/Open-ILS/src/sql/Pg/002.schema.config.sql	2010-09-28 04:12:10 UTC (rev 18070)
+++ branches/rel_2_0/Open-ILS/src/sql/Pg/002.schema.config.sql	2010-09-28 05:13:27 UTC (rev 18071)
@@ -70,7 +70,7 @@
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0421'); -- Scott McKellar
+INSERT INTO config.upgrade_log (version) VALUES ('0422'); -- Scott McKellar
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,

Added: branches/rel_2_0/Open-ILS/src/sql/Pg/upgrade/0422.schema.acq.lineitem-history-bigint.sql
===================================================================
--- branches/rel_2_0/Open-ILS/src/sql/Pg/upgrade/0422.schema.acq.lineitem-history-bigint.sql	                        (rev 0)
+++ branches/rel_2_0/Open-ILS/src/sql/Pg/upgrade/0422.schema.acq.lineitem-history-bigint.sql	2010-09-28 05:13:27 UTC (rev 18071)
@@ -0,0 +1,15 @@
+BEGIN;
+
+-- Turn an int into a bigint in acq.acq_lineitem_history, following up on
+-- a similar change to acq.lineitem
+
+INSERT INTO config.upgrade_log (version) VALUES ('0422'); -- Scott McKellar
+
+DROP VIEW IF EXISTS acq.acq_lineitem_lifecycle;
+
+ALTER TABLE acq.acq_lineitem_history
+	ALTER COLUMN eg_bib_id SET DATA TYPE bigint;
+
+SELECT acq.create_acq_lifecycle( 'acq', 'lineitem' );
+
+COMMIT;



More information about the open-ils-commits mailing list