From: scottmk Date: Wed, 22 Sep 2010 19:16:26 +0000 (+0000) Subject: Adding a trigger. Upgrade # 0364 created the trigger function but not X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3d9ec456071aad84a08deefdcddbfe68c12f9af2;p=evergreen%2Fmasslnc.git Adding a trigger. Upgrade # 0364 created the trigger function but not the trigger itself. However the base install script 040.schema.asset.sql creates both the function and the trigger. M Open-ILS/src/sql/Pg/002.schema.config.sql A Open-ILS/src/sql/Pg/upgrade/0414.schema.call-number-upd-ins-trigger.sql git-svn-id: svn://svn.open-ils.org/ILS/trunk@17891 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index fca4b6ba40..10784c3c21 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 ('0412'); -- phasefx +INSERT INTO config.upgrade_log (version) VALUES ('0414'); -- Scott McKellar CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0414.schema.call-number-upd-ins-trigger.sql b/Open-ILS/src/sql/Pg/upgrade/0414.schema.call-number-upd-ins-trigger.sql new file mode 100644 index 0000000000..11498988bd --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0414.schema.call-number-upd-ins-trigger.sql @@ -0,0 +1,13 @@ +BEGIN; + +-- Adding a trigger. Upgrade # 0364 created the trigger function but not +-- the trigger itself. However the base install script 040.schema.asset.sql +-- creates both the function and the trigger. + +INSERT INTO config.upgrade_log (version) VALUES ('0414'); -- Scott McKellar + +CREATE TRIGGER asset_label_sortkey_trigger + BEFORE UPDATE OR INSERT ON asset.call_number + FOR EACH ROW EXECUTE PROCEDURE asset.label_normalizer(); + +COMMIT;