LP#1550495: stamp DB update
authorGalen Charlton <gmc@esilibrary.com>
Mon, 14 Mar 2016 18:46:19 +0000 (14:46 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 14 Mar 2016 18:46:19 +0000 (14:46 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0972.data.acq-cancel_reason-add-85.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/xxxx.acq.cancel_reason-add-85.sql [deleted file]

index 8d6b9cd..36cdbc8 100644 (file)
@@ -91,7 +91,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 ('0971', :eg_version); -- csharp/Dyrcona
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0972', :eg_version); -- jstompro/gmcharlt
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0972.data.acq-cancel_reason-add-85.sql b/Open-ILS/src/sql/Pg/upgrade/0972.data.acq-cancel_reason-add-85.sql
new file mode 100644 (file)
index 0000000..ac27300
--- /dev/null
@@ -0,0 +1,18 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0972', :eg_version); -- jstompro/gmcharlt
+
+-- LP#1550495 - Add Baker&Taylor EDI Quantity Cancel Code
+-- Insert EDI Cancel Reason 85 (1200 + 85 = 1285) if it doesn't already exist
+INSERT INTO acq.cancel_reason 
+   (org_unit, keep_debits, id, label, description)
+   SELECT 
+     1, 'f',( 85+1200),
+     oils_i18n_gettext(1285, 'Canceled: By Vendor', 'acqcr', 'label'),
+     oils_i18n_gettext(1285, 'Line item canceled by vendor', 'acqcr', 'description')
+   WHERE NOT EXISTS (
+    SELECT 1 FROM acq.cancel_reason where id=(85+1200)
+   );
+
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/xxxx.acq.cancel_reason-add-85.sql b/Open-ILS/src/sql/Pg/upgrade/xxxx.acq.cancel_reason-add-85.sql
deleted file mode 100644 (file)
index d2e2273..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-BEGIN;
-
--- INSERT INTO config.upgrade_log (version) VALUES ('xxxx');
-
--- LP#1550495 - Add Baker&Taylor EDI Quantity Cancel Code
--- Insert EDI Cancel Reason 85 (1200 + 85 = 1285) if it doesn't already exist
-INSERT INTO acq.cancel_reason 
-   (org_unit, keep_debits, id, label, description)
-   SELECT 
-     1, 'f',( 85+1200),
-     oils_i18n_gettext(1285, 'Canceled: By Vendor', 'acqcr', 'label'),
-     oils_i18n_gettext(1285, 'Line item canceled by vendor', 'acqcr', 'description')
-   WHERE NOT EXISTS (
-    SELECT 1 FROM acq.cancel_reason where id=(85+1200)
-   );
-
-
-COMMIT;