From: Galen Charlton Date: Fri, 2 Apr 2021 21:55:09 +0000 (-0400) Subject: LP#1905091: stamp DB update X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=422971f7868151bec3aa703ef88af8b1d72679c0;p=evergreen%2Fmasslnc.git LP#1905091: stamp DB update Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 7939630474..a7dfd74515 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 ('1258', :eg_version); -- berick/gcollum/sandbergja +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1259', :eg_version); -- mmorgan/JBoyer/gmcharlt CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/1259.data.lp1905091.missing_print_email_trigger_environment.sql b/Open-ILS/src/sql/Pg/upgrade/1259.data.lp1905091.missing_print_email_trigger_environment.sql new file mode 100644 index 0000000000..3614c0997e --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/1259.data.lp1905091.missing_print_email_trigger_environment.sql @@ -0,0 +1,23 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('1259', :eg_version); + +INSERT INTO action_trigger.environment (event_def,path) +SELECT id,'items' from action_trigger.event_definition WHERE name='biblio.record_entry.print.full' +AND NOT EXISTS (SELECT 1 FROM action_trigger.environment WHERE +event_def=(SELECT id FROM action_trigger.event_definition WHERE name ='biblio.record_entry.print.full' AND owner=1 LIMIT 1) +AND path='items'); + +INSERT INTO action_trigger.environment (event_def,path) +SELECT id,'items' from action_trigger.event_definition WHERE name='biblio.record_entry.email.full' +AND NOT EXISTS (SELECT 1 FROM action_trigger.environment WHERE +event_def=(SELECT id FROM action_trigger.event_definition WHERE name ='biblio.record_entry.email.full' AND owner=1 LIMIT 1) +AND path='items'); + +INSERT INTO action_trigger.environment (event_def,path) +SELECT id,'owner' from action_trigger.event_definition WHERE name='biblio.record_entry.email.full' +AND NOT EXISTS (SELECT 1 FROM action_trigger.environment WHERE +event_def=(SELECT id FROM action_trigger.event_definition WHERE name ='biblio.record_entry.email.full' AND owner=1 LIMIT 1) +AND path='owner'); + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1905091.missing_print_email_trigger_environment.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1905091.missing_print_email_trigger_environment.sql deleted file mode 100644 index a0147932c4..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.lp1905091.missing_print_email_trigger_environment.sql +++ /dev/null @@ -1,23 +0,0 @@ -BEGIN; - -SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); - -INSERT INTO action_trigger.environment (event_def,path) -SELECT id,'items' from action_trigger.event_definition WHERE name='biblio.record_entry.print.full' -AND NOT EXISTS (SELECT 1 FROM action_trigger.environment WHERE -event_def=(SELECT id FROM action_trigger.event_definition WHERE name ='biblio.record_entry.print.full' AND owner=1 LIMIT 1) -AND path='items'); - -INSERT INTO action_trigger.environment (event_def,path) -SELECT id,'items' from action_trigger.event_definition WHERE name='biblio.record_entry.email.full' -AND NOT EXISTS (SELECT 1 FROM action_trigger.environment WHERE -event_def=(SELECT id FROM action_trigger.event_definition WHERE name ='biblio.record_entry.email.full' AND owner=1 LIMIT 1) -AND path='items'); - -INSERT INTO action_trigger.environment (event_def,path) -SELECT id,'owner' from action_trigger.event_definition WHERE name='biblio.record_entry.email.full' -AND NOT EXISTS (SELECT 1 FROM action_trigger.environment WHERE -event_def=(SELECT id FROM action_trigger.event_definition WHERE name ='biblio.record_entry.email.full' AND owner=1 LIMIT 1) -AND path='owner'); - -COMMIT;