From: Jason Etheridge Date: Thu, 10 Sep 2020 20:33:48 +0000 (-0400) Subject: LP#1857150: stamp schema update X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0e2b3483916b404629c0101ebfd3a7dc1dc5c104;p=contrib%2FConifer.git LP#1857150: stamp schema update Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index d2e09d280e..ae99152dae 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 ('1224', :eg_version); -- rhamby/gmcharlt +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1226', :eg_version); -- phasefx/gmcharlt CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/1225.schema.provider-primary-contact.sql b/Open-ILS/src/sql/Pg/upgrade/1225.schema.provider-primary-contact.sql new file mode 100644 index 0000000000..43fcd62d95 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/1225.schema.provider-primary-contact.sql @@ -0,0 +1,8 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('1225', :eg_version); + +ALTER TABLE acq.provider ADD COLUMN primary_contact INT; +ALTER TABLE acq.provider ADD CONSTRAINT acq_provider_primary_contact_fkey FOREIGN KEY (primary_contact) REFERENCES acq.provider_contact (id) ON DELETE SET NULL ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED; + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/1226.data.angular-providers.sql b/Open-ILS/src/sql/Pg/upgrade/1226.data.angular-providers.sql new file mode 100644 index 0000000000..e126977d05 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/1226.data.angular-providers.sql @@ -0,0 +1,69 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('1226', :eg_version); + +INSERT INTO config.workstation_setting_type + (name, grp, datatype, label) +VALUES ( + 'eg.grid.acq.provider.addresses', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.acq.provider.addresses', + 'Grid Config: acq.provider.addresses', + 'cwst', 'label') +), ( + 'eg.grid.acq.provider.attributes', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.acq.provider.attributes', + 'Grid Config: acq.provider.attributes', + 'cwst', 'label') +), ( + 'eg.grid.acq.provider.contact.addresses', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.acq.provider.contact.addresses', + 'Grid Config: acq.provider.contact.addresses', + 'cwst', 'label') +), ( + 'eg.grid.acq.provider.contacts', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.acq.provider.contacts', + 'Grid Config: acq.provider.contacts', + 'cwst', 'label') +), ( + 'eg.grid.acq.provider.edi_accounts', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.acq.provider.edi_accounts', + 'Grid Config: acq.provider.edi_accounts', + 'cwst', 'label') +), ( + 'eg.grid.acq.provider.edi_messages', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.acq.provider.edi_messages', + 'Grid Config: acq.provider.edi_messages', + 'cwst', 'label') +), ( + 'eg.grid.acq.provider.holdings', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.acq.provider.holdings', + 'Grid Config: acq.provider.holdings', + 'cwst', 'label') +), ( + 'eg.grid.acq.provider.invoices', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.acq.provider.invoices', + 'Grid Config: acq.provider.invoices', + 'cwst', 'label') +), ( + 'eg.grid.acq.provider.purchaseorders', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.acq.provider.purchaseorders', + 'Grid Config: acq.provider.purchaseorders', + 'cwst', 'label') +), ( + 'eg.grid.acq.provider.search.results', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.acq.provider.search.results', + 'Grid Config: acq.provider.search.results', + 'cwst', 'label') +); + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/AAAA.schema.provider-primary-contact.sql b/Open-ILS/src/sql/Pg/upgrade/AAAA.schema.provider-primary-contact.sql deleted file mode 100644 index b95f456bd8..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/AAAA.schema.provider-primary-contact.sql +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN; - --- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); - -ALTER TABLE acq.provider ADD COLUMN primary_contact INT; -ALTER TABLE acq.provider ADD CONSTRAINT acq_provider_primary_contact_fkey FOREIGN KEY (primary_contact) REFERENCES acq.provider_contact (id) ON DELETE SET NULL ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED; - -COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/ZZZZ.data.angular-providers.sql b/Open-ILS/src/sql/Pg/upgrade/ZZZZ.data.angular-providers.sql deleted file mode 100644 index cedae0a369..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/ZZZZ.data.angular-providers.sql +++ /dev/null @@ -1,67 +0,0 @@ -BEGIN; - -INSERT INTO config.workstation_setting_type - (name, grp, datatype, label) -VALUES ( - 'eg.grid.acq.provider.addresses', 'gui', 'object', - oils_i18n_gettext( - 'eg.grid.acq.provider.addresses', - 'Grid Config: acq.provider.addresses', - 'cwst', 'label') -), ( - 'eg.grid.acq.provider.attributes', 'gui', 'object', - oils_i18n_gettext( - 'eg.grid.acq.provider.attributes', - 'Grid Config: acq.provider.attributes', - 'cwst', 'label') -), ( - 'eg.grid.acq.provider.contact.addresses', 'gui', 'object', - oils_i18n_gettext( - 'eg.grid.acq.provider.contact.addresses', - 'Grid Config: acq.provider.contact.addresses', - 'cwst', 'label') -), ( - 'eg.grid.acq.provider.contacts', 'gui', 'object', - oils_i18n_gettext( - 'eg.grid.acq.provider.contacts', - 'Grid Config: acq.provider.contacts', - 'cwst', 'label') -), ( - 'eg.grid.acq.provider.edi_accounts', 'gui', 'object', - oils_i18n_gettext( - 'eg.grid.acq.provider.edi_accounts', - 'Grid Config: acq.provider.edi_accounts', - 'cwst', 'label') -), ( - 'eg.grid.acq.provider.edi_messages', 'gui', 'object', - oils_i18n_gettext( - 'eg.grid.acq.provider.edi_messages', - 'Grid Config: acq.provider.edi_messages', - 'cwst', 'label') -), ( - 'eg.grid.acq.provider.holdings', 'gui', 'object', - oils_i18n_gettext( - 'eg.grid.acq.provider.holdings', - 'Grid Config: acq.provider.holdings', - 'cwst', 'label') -), ( - 'eg.grid.acq.provider.invoices', 'gui', 'object', - oils_i18n_gettext( - 'eg.grid.acq.provider.invoices', - 'Grid Config: acq.provider.invoices', - 'cwst', 'label') -), ( - 'eg.grid.acq.provider.purchaseorders', 'gui', 'object', - oils_i18n_gettext( - 'eg.grid.acq.provider.purchaseorders', - 'Grid Config: acq.provider.purchaseorders', - 'cwst', 'label') -), ( - 'eg.grid.acq.provider.search.results', 'gui', 'object', - oils_i18n_gettext( - 'eg.grid.acq.provider.search.results', - 'Grid Config: acq.provider.search.results', - 'cwst', 'label') -); - -COMMIT;