Turn an int into a bigint in acq.acq_lineitem_history, following up on
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 28 Sep 2010 05:13:32 +0000 (05:13 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 28 Sep 2010 05:13:32 +0000 (05:13 +0000)
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

git-svn-id: svn://svn.open-ils.org/ILS/trunk@18072 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0422.schema.acq.lineitem-history-bigint.sql [new file with mode: 0644]

index 1dbd195..25d36be 100644 (file)
@@ -70,7 +70,7 @@ CREATE TABLE config.upgrade_log (
     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,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0422.schema.acq.lineitem-history-bigint.sql b/Open-ILS/src/sql/Pg/upgrade/0422.schema.acq.lineitem-history-bigint.sql
new file mode 100644 (file)
index 0000000..4b9bc17
--- /dev/null
@@ -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;