From a04d27411730c76a65ea0e0e9c9cd606c847a800 Mon Sep 17 00:00:00 2001 From: scottmk Date: Tue, 28 Sep 2010 05:13:27 +0000 Subject: [PATCH] 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 git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@18071 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- .../upgrade/0422.schema.acq.lineitem-history-bigint.sql | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0422.schema.acq.lineitem-history-bigint.sql diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 1dbd195d66..25d36be27f 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -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 index 0000000000..4b9bc1776a --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0422.schema.acq.lineitem-history-bigint.sql @@ -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; -- 2.11.0