From 4d267c5617e85520a8280cee946bda5c3ddb062d Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Tue, 21 Sep 2021 16:22:43 -0400 Subject: [PATCH] LP#1207533: Stamp upgrade scripts, minor typo correction Signed-off-by: Chris Sharp --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- ...ma.triggered_event_log.sql => 1291.schema.triggered_event_log.sql} | 2 +- ...triggered_event_log.sql => 1292.functions.triggered_event_log.sql} | 2 +- ...iggered_event_log.sql => 1293.schema.item_triggered_event_log.sql} | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) rename Open-ILS/src/sql/Pg/upgrade/{XXXX.schema.triggered_event_log.sql => 1291.schema.triggered_event_log.sql} (97%) rename Open-ILS/src/sql/Pg/upgrade/{YYYY.functions.triggered_event_log.sql => 1292.functions.triggered_event_log.sql} (99%) rename Open-ILS/src/sql/Pg/upgrade/{ZZZZ.schema.item_triggered_event_log.sql => 1293.schema.item_triggered_event_log.sql} (87%) diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 55bc324e63..715d1b1ca0 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -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 ('1290', :eg_version); -- tlittle / lstratton / gmcharlt +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1293', :eg_version); -- phasefx / miker / ddale / csharp CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.triggered_event_log.sql b/Open-ILS/src/sql/Pg/upgrade/1291.schema.triggered_event_log.sql similarity index 97% rename from Open-ILS/src/sql/Pg/upgrade/XXXX.schema.triggered_event_log.sql rename to Open-ILS/src/sql/Pg/upgrade/1291.schema.triggered_event_log.sql index 203a6b3fd5..ffbf505859 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.triggered_event_log.sql +++ b/Open-ILS/src/sql/Pg/upgrade/1291.schema.triggered_event_log.sql @@ -1,6 +1,6 @@ BEGIN; -SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); +SELECT evergreen.upgrade_deps_block_check('1291', :eg_version); -- context_usr_path TEXT, -- for optimizing action_trigger.event -- context_library_path TEXT, -- ''' diff --git a/Open-ILS/src/sql/Pg/upgrade/YYYY.functions.triggered_event_log.sql b/Open-ILS/src/sql/Pg/upgrade/1292.functions.triggered_event_log.sql similarity index 99% rename from Open-ILS/src/sql/Pg/upgrade/YYYY.functions.triggered_event_log.sql rename to Open-ILS/src/sql/Pg/upgrade/1292.functions.triggered_event_log.sql index 987fe255d4..5653b72883 100644 --- a/Open-ILS/src/sql/Pg/upgrade/YYYY.functions.triggered_event_log.sql +++ b/Open-ILS/src/sql/Pg/upgrade/1292.functions.triggered_event_log.sql @@ -1,6 +1,6 @@ BEGIN; -SELECT evergreen.upgrade_deps_block_check('YYYY', :eg_version); +SELECT evergreen.upgrade_deps_block_check('1292', :eg_version); CREATE OR REPLACE FUNCTION action.age_circ_on_delete () RETURNS TRIGGER AS $$ DECLARE diff --git a/Open-ILS/src/sql/Pg/upgrade/ZZZZ.schema.item_triggered_event_log.sql b/Open-ILS/src/sql/Pg/upgrade/1293.schema.item_triggered_event_log.sql similarity index 87% rename from Open-ILS/src/sql/Pg/upgrade/ZZZZ.schema.item_triggered_event_log.sql rename to Open-ILS/src/sql/Pg/upgrade/1293.schema.item_triggered_event_log.sql index 57882a373a..79d4049285 100644 --- a/Open-ILS/src/sql/Pg/upgrade/ZZZZ.schema.item_triggered_event_log.sql +++ b/Open-ILS/src/sql/Pg/upgrade/1293.schema.item_triggered_event_log.sql @@ -1,6 +1,6 @@ BEGIN; -SELECT evergreen.upgrade_deps_block_check('ZZZZ', :eg_version); +SELECT evergreen.upgrade_deps_block_check('1293', :eg_version); INSERT INTO config.workstation_setting_type (name, grp, datatype, label) @@ -71,7 +71,7 @@ WHERE -- \pset format unaligned -- \t -- \o update_action_trigger_events_for_circs.sql --- SELECT 'UPDATE action_trigger.event e SET context_item = c.target_copy FROM action.circulation cWHERE c.id = e.target AND e.id = ' || e.id || ' RETURNING ' || e.id || ';' FROM action_trigger.event e, action.circulation c WHERE e.target = c.id AND e.event_def IN (SELECT id FROM action_trigger.event_definition WHERE hook in (SELECT key FROM action_trigger.hook WHERE core_type = 'circ')) ORDER BY e.id DESC; +-- SELECT 'UPDATE action_trigger.event e SET context_item = c.target_copy FROM action.circulation c WHERE c.id = e.target AND e.id = ' || e.id || ' RETURNING ' || e.id || ';' FROM action_trigger.event e, action.circulation c WHERE e.target = c.id AND e.event_def IN (SELECT id FROM action_trigger.event_definition WHERE hook in (SELECT key FROM action_trigger.hook WHERE core_type = 'circ')) ORDER BY e.id DESC; -- \o -- \o update_action_trigger_events_for_holds.sql -- SELECT 'UPDATE action_trigger.event e SET context_item = h.current_copy FROM action.hold_request h WHERE h.id = e.target AND e.id = ' || e.id || ' RETURNING ' || e.id || ';' FROM action_trigger.event e, action.hold_request h WHERE e.target = h.id AND e.event_def IN (SELECT id FROM action_trigger.event_definition WHERE hook in (SELECT key FROM action_trigger.hook WHERE core_type = 'ahr')) ORDER BY e.id DESC; -- 2.11.0