From 7d1040a86595c50dadb235c5c014ae7a5e9294f4 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 3 Jun 2011 08:35:21 -0400 Subject: [PATCH] Wrapped upgrade script Signed-off-by: Bill Erickson --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- .../{XXXX.sip_statcats.sql => 0546.schema.sip_statcats.sql} | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) rename Open-ILS/src/sql/Pg/upgrade/{XXXX.sip_statcats.sql => 0546.schema.sip_statcats.sql} (93%) diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 743be6be86..ed2c3fa410 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps BEFORE INSERT OR UPDATE ON config.db_patch_dependencies FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates'); -INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0545', :eg_version); -- berick +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0546', :eg_version); -- berick CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.sip_statcats.sql b/Open-ILS/src/sql/Pg/upgrade/0546.schema.sip_statcats.sql similarity index 93% rename from Open-ILS/src/sql/Pg/upgrade/XXXX.sip_statcats.sql rename to Open-ILS/src/sql/Pg/upgrade/0546.schema.sip_statcats.sql index aa9c5cd956..81e3bfe4d4 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.sip_statcats.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0546.schema.sip_statcats.sql @@ -1,3 +1,10 @@ +-- Evergreen DB patch 0546.schema.sip_statcats.sql +BEGIN; + + +-- check whether patch can be applied +SELECT evergreen.upgrade_deps_block_check('0546', :eg_version); + CREATE TABLE actor.stat_cat_sip_fields ( field CHAR(2) PRIMARY KEY, name TEXT NOT NULL, @@ -72,3 +79,6 @@ $func$ LANGUAGE PLPGSQL; CREATE TRIGGER asset_stat_cat_sip_update_trigger BEFORE INSERT OR UPDATE ON asset.stat_cat FOR EACH ROW EXECUTE PROCEDURE asset.stat_cat_check(); + + +COMMIT; -- 2.11.0