LP#1786100: stamp schema update
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 9 Feb 2021 16:45:46 +0000 (11:45 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 9 Feb 2021 16:45:46 +0000 (11:45 -0500)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/sql/Pg/upgrade/1244.schema.fix_actcm_inh_fkey_trigger.sql [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.fix_actcm_inh_fkey_trigger.sql [deleted file]

index b949ff0..e11f361 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 ('1243', :eg_version); -- berick/ehardy
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1244', :eg_version); -- gmcharlt/rhamby
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/1244.schema.fix_actcm_inh_fkey_trigger.sql b/Open-ILS/src/sql/Pg/upgrade/1244.schema.fix_actcm_inh_fkey_trigger.sql
new file mode 100644 (file)
index 0000000..743e7ee
--- /dev/null
@@ -0,0 +1,16 @@
+SELECT evergreen.upgrade_deps_block_check('1244', :eg_version);
+-- In some cases, asset.copy_tag_copy_map might have an inh_fkey()
+-- trigger that fires on delete when it's not supposed to. This
+-- update drops all inh_fkey triggers on that table and recreates
+-- the known good version.
+DROP TRIGGER IF EXISTS inherit_asset_copy_tag_copy_map_copy_fkey ON asset.copy_tag_copy_map;
+DROP TRIGGER IF EXISTS inherit_copy_tag_copy_map_copy_fkey ON asset.copy_tag_copy_map;
+CREATE CONSTRAINT TRIGGER inherit_asset_copy_tag_copy_map_copy_fkey
+        AFTER UPDATE OR INSERT ON asset.copy_tag_copy_map
+        DEFERRABLE FOR EACH ROW EXECUTE PROCEDURE evergreen.asset_copy_tag_copy_map_copy_inh_fkey();
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.fix_actcm_inh_fkey_trigger.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.fix_actcm_inh_fkey_trigger.sql
deleted file mode 100644 (file)
index 987e2b8..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
--- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
--- In some cases, asset.copy_tag_copy_map might have an inh_fkey()
--- trigger that fires on delete when it's not supposed to. This
--- update drops all inh_fkey triggers on that table and recreates
--- the known good version.
-DROP TRIGGER IF EXISTS inherit_asset_copy_tag_copy_map_copy_fkey ON asset.copy_tag_copy_map;
-DROP TRIGGER IF EXISTS inherit_copy_tag_copy_map_copy_fkey ON asset.copy_tag_copy_map;
-CREATE CONSTRAINT TRIGGER inherit_asset_copy_tag_copy_map_copy_fkey
-        AFTER UPDATE OR INSERT ON asset.copy_tag_copy_map
-        DEFERRABLE FOR EACH ROW EXECUTE PROCEDURE evergreen.asset_copy_tag_copy_map_copy_inh_fkey();