LP#2007073: stamp DB update
authorGalen Charlton <gmc@equinoxOLI.org>
Wed, 29 Mar 2023 15:33:38 +0000 (11:33 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Wed, 29 Mar 2023 15:34:42 +0000 (11:34 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/1363.schema.action.hold_request_cancel_cause.manual.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.action.hold_request_cancel_cause.manual.sql [deleted file]

index e9a24ca..19adddd 100644 (file)
@@ -92,7 +92,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 ('1362', :eg_version); -- Dyrcona / gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1363', :eg_version); -- dbriem / smorrison / gmcharlt
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/1363.schema.action.hold_request_cancel_cause.manual.sql b/Open-ILS/src/sql/Pg/upgrade/1363.schema.action.hold_request_cancel_cause.manual.sql
new file mode 100644 (file)
index 0000000..0e9f74f
--- /dev/null
@@ -0,0 +1,22 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1363', :eg_version);
+
+ALTER TABLE action.hold_request_cancel_cause
+  ADD COLUMN manual BOOL NOT NULL DEFAULT FALSE;
+
+UPDATE action.hold_request_cancel_cause SET manual = TRUE
+  WHERE id IN (
+    2, -- Hold Shelf expiration
+    3, -- Patron via phone
+    4, -- Patron in person
+    5  -- Staff forced
+  );
+
+INSERT INTO action.hold_request_cancel_cause (id, label, manual)
+  VALUES (9, oils_i18n_gettext(9, 'Patron via email', 'ahrcc', 'label'), TRUE);
+
+INSERT INTO action.hold_request_cancel_cause (id, label, manual)
+  VALUES (10, oils_i18n_gettext(10, 'Patron via SMS', 'ahrcc', 'label'), TRUE);
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.action.hold_request_cancel_cause.manual.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.action.hold_request_cancel_cause.manual.sql
deleted file mode 100644 (file)
index a80576c..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-BEGIN;
-
-ALTER TABLE action.hold_request_cancel_cause
-  ADD COLUMN manual BOOL NOT NULL DEFAULT FALSE;
-
-UPDATE action.hold_request_cancel_cause SET manual = TRUE
-  WHERE id IN (
-    2, -- Hold Shelf expiration
-    3, -- Patron via phone
-    4, -- Patron in person
-    5  -- Staff forced
-  );
-
-INSERT INTO action.hold_request_cancel_cause (id, label, manual)
-  VALUES (9, oils_i18n_gettext(9, 'Patron via email', 'ahrcc', 'label'), TRUE);
-
-INSERT INTO action.hold_request_cancel_cause (id, label, manual)
-  VALUES (10, oils_i18n_gettext(10, 'Patron via SMS', 'ahrcc', 'label'), TRUE);
-
-COMMIT;