From: Jane Sandberg Date: Mon, 28 Mar 2022 12:43:25 +0000 (-0700) Subject: Stamping upgrade script for localized notifications X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0c7b13fc33c2c56edcad44771ece3d0cd37c7c09;p=working%2FEvergreen.git Stamping upgrade script for localized notifications --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index e36d5f3c2a..7dce65dec3 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 ('1323', :eg_version); -- lucien/remingtron/sandbergja/gmcharlt/miker +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1324', :eg_version); -- rhamby/miker/sandbergja CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/1324.schema.preferred_locale_and_alternate_at_templates.sql b/Open-ILS/src/sql/Pg/upgrade/1324.schema.preferred_locale_and_alternate_at_templates.sql new file mode 100644 index 0000000000..116b558ef7 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/1324.schema.preferred_locale_and_alternate_at_templates.sql @@ -0,0 +1,20 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('1324', :eg_version); + +CREATE TABLE action_trigger.alternate_template ( + id SERIAL, + event_def INTEGER REFERENCES action_trigger.event_definition(id) INITIALLY DEFERRED, + template TEXT, + active BOOLEAN DEFAULT TRUE, + message_title TEXT, + message_template TEXT, + locale TEXT REFERENCES config.i18n_locale(code) INITIALLY DEFERRED, + UNIQUE (event_def,locale) +); + +ALTER TABLE actor.usr ADD COLUMN locale TEXT REFERENCES config.i18n_locale(code) INITIALLY DEFERRED; + +ALTER TABLE action_trigger.event_output ADD COLUMN locale TEXT; + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/xxxx.schema.preferred_locale_and_alternate_at_templates.sql b/Open-ILS/src/sql/Pg/upgrade/xxxx.schema.preferred_locale_and_alternate_at_templates.sql deleted file mode 100644 index d70fd2fbca..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/xxxx.schema.preferred_locale_and_alternate_at_templates.sql +++ /dev/null @@ -1,20 +0,0 @@ -BEGIN; - -SELECT evergreen.upgrade_deps_block_check('xxxx', :eg_version); - -CREATE TABLE action_trigger.alternate_template ( - id SERIAL, - event_def INTEGER REFERENCES action_trigger.event_definition(id) INITIALLY DEFERRED, - template TEXT, - active BOOLEAN DEFAULT TRUE, - message_title TEXT, - message_template TEXT, - locale TEXT REFERENCES config.i18n_locale(code) INITIALLY DEFERRED, - UNIQUE (event_def,locale) -); - -ALTER TABLE actor.usr ADD COLUMN locale TEXT REFERENCES config.i18n_locale(code) INITIALLY DEFERRED; - -ALTER TABLE action_trigger.event_output ADD COLUMN locale TEXT; - -COMMIT;