From: Mike Rylander Date: Thu, 24 Mar 2022 13:01:34 +0000 (-0400) Subject: Stamping upgrade script X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=11e7e6ec6c8c6d8077dc1fe21a5b6d2a800add95;p=evergreen%2Fmasslnc.git Stamping upgrade script Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index f49c1dec42..be5d1d0ae6 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 ('1314', :eg_version); -- Dyrcona/miker +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1317', :eg_version); -- gmc/miker CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/1315.schema.portal_page_table.sql b/Open-ILS/src/sql/Pg/upgrade/1315.schema.portal_page_table.sql new file mode 100644 index 0000000000..259edf041c --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/1315.schema.portal_page_table.sql @@ -0,0 +1,36 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('1315', :eg_version); + +CREATE TABLE config.ui_staff_portal_page_entry_type ( + code TEXT PRIMARY KEY, + label TEXT NOT NULL +); + +INSERT INTO config.ui_staff_portal_page_entry_type (code, label) +VALUES + ('link', oils_i18n_gettext('link', 'Link', 'cusppet', 'label')), + ('menuitem', oils_i18n_gettext('menuitem', 'Menu Item', 'cusppet', 'label')), + ('text', oils_i18n_gettext('text', 'Text and/or HTML', 'cusppet', 'label')), + ('header', oils_i18n_gettext('header', 'Header', 'cusppet', 'label')), + ('catalogsearch', oils_i18n_gettext('catalogsearch', 'Catalog Search Box', 'cusppet', 'label')); + + +CREATE TABLE config.ui_staff_portal_page_entry ( + id SERIAL PRIMARY KEY, + page_col INTEGER NOT NULL, + col_pos INTEGER NOT NULL, + entry_type TEXT NOT NULL, -- REFERENCES config.ui_staff_portal_page_entry_type(code) + label TEXT, + image_url TEXT, + target_url TEXT, + entry_text TEXT, + owner INT NOT NULL -- REFERENCES actor.org_unit (id) +); + +ALTER TABLE config.ui_staff_portal_page_entry ADD CONSTRAINT cusppe_entry_type_fkey + FOREIGN KEY (entry_type) REFERENCES config.ui_staff_portal_page_entry_type(code) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE config.ui_staff_portal_page_entry ADD CONSTRAINT cusppe_owner_fkey + FOREIGN KEY (owner) REFERENCES actor.org_unit(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/1316.data.default_portal_page.sql b/Open-ILS/src/sql/Pg/upgrade/1316.data.default_portal_page.sql new file mode 100644 index 0000000000..dc80e102b4 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/1316.data.default_portal_page.sql @@ -0,0 +1,36 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('1316', :eg_version); + +INSERT INTO config.ui_staff_portal_page_entry + (id, page_col, col_pos, entry_type, label, image_url, target_url, owner) +VALUES + ( 1, 1, 0, 'header', oils_i18n_gettext( 1, 'Circulation and Patrons', 'cusppe', 'label'), NULL, NULL, 1) +, ( 2, 1, 1, 'menuitem', oils_i18n_gettext( 2, 'Check Out Items', 'cusppe', 'label'), '/images/portal/forward.png', '/eg/staff/circ/patron/bcsearch', 1) +, ( 3, 1, 2, 'menuitem', oils_i18n_gettext( 3, 'Check In Items', 'cusppe', 'label'), '/images/portal/back.png', '/eg/staff/circ/checkin/index', 1) +, ( 4, 1, 3, 'menuitem', oils_i18n_gettext( 4, 'Search For Patron By Name', 'cusppe', 'label'), '/images/portal/retreivepatron.png', '/eg/staff/circ/patron/search', 1) +, ( 5, 2, 0, 'header', oils_i18n_gettext( 5, 'Item Search and Cataloging', 'cusppe', 'label'), NULL, NULL, 1) +, ( 6, 2, 1, 'catalogsearch', oils_i18n_gettext( 6, 'Search Catalog', 'cusppe', 'label'), NULL, NULL, 1) +, ( 7, 2, 2, 'menuitem', oils_i18n_gettext( 7, 'Record Buckets', 'cusppe', 'label'), '/images/portal/bucket.png', '/eg/staff/cat/bucket/record/', 1) +, ( 8, 2, 3, 'menuitem', oils_i18n_gettext( 8, 'Item Buckets', 'cusppe', 'label'), '/images/portal/bucket.png', '/eg/staff/cat/bucket/copy/', 1) +, ( 9, 3, 0, 'header', oils_i18n_gettext( 9, 'Administration', 'cusppe', 'label'), NULL, NULL, 1) +, (10, 3, 1, 'link', oils_i18n_gettext(10, 'Evergreen Documentation', 'cusppe', 'label'), '/images/portal/helpdesk.png', 'https://docs.evergreen-ils.org', 1) +, (11, 3, 2, 'menuitem', oils_i18n_gettext(11, 'Workstation Administration', 'cusppe', 'label'), '/images/portal/helpdesk.png', '/eg/staff/admin/workstation/index', 1) +, (12, 3, 3, 'menuitem', oils_i18n_gettext(12, 'Reports', 'cusppe', 'label'), '/images/portal/reports.png', '/eg/staff/reporter/legacy/main', 1) +; + +SELECT setval('config.ui_staff_portal_page_entry_id_seq', 100); + + +INSERT INTO config.workstation_setting_type (name, grp, datatype, label) +VALUES ( + 'eg.grid.admin.config.ui_staff_portal_page_entry', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.admin.config.ui_staff_portal_page_entry', + 'Grid Config: admin.config.ui_staff_portal_page_entry', + 'cwst', 'label' + ) +); + +COMMIT; + diff --git a/Open-ILS/src/sql/Pg/upgrade/1317.data.portal_admin_perm.sql b/Open-ILS/src/sql/Pg/upgrade/1317.data.portal_admin_perm.sql new file mode 100644 index 0000000000..5dce02c15c --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/1317.data.portal_admin_perm.sql @@ -0,0 +1,10 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('1317', :eg_version); + +INSERT INTO permission.perm_list ( id, code, description ) VALUES +( 636, 'ADMIN_STAFF_PORTAL_PAGE', oils_i18n_gettext( 636, + 'Update the staff client portal page', 'ppl', 'description' )) +; + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.portal_page_table.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.portal_page_table.sql deleted file mode 100644 index 41e872c9b2..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.portal_page_table.sql +++ /dev/null @@ -1,34 +0,0 @@ -BEGIN; - -CREATE TABLE config.ui_staff_portal_page_entry_type ( - code TEXT PRIMARY KEY, - label TEXT NOT NULL -); - -INSERT INTO config.ui_staff_portal_page_entry_type (code, label) -VALUES - ('link', oils_i18n_gettext('link', 'Link', 'cusppet', 'label')), - ('menuitem', oils_i18n_gettext('menuitem', 'Menu Item', 'cusppet', 'label')), - ('text', oils_i18n_gettext('text', 'Text and/or HTML', 'cusppet', 'label')), - ('header', oils_i18n_gettext('header', 'Header', 'cusppet', 'label')), - ('catalogsearch', oils_i18n_gettext('catalogsearch', 'Catalog Search Box', 'cusppet', 'label')); - - -CREATE TABLE config.ui_staff_portal_page_entry ( - id SERIAL PRIMARY KEY, - page_col INTEGER NOT NULL, - col_pos INTEGER NOT NULL, - entry_type TEXT NOT NULL, -- REFERENCES config.ui_staff_portal_page_entry_type(code) - label TEXT, - image_url TEXT, - target_url TEXT, - entry_text TEXT, - owner INT NOT NULL -- REFERENCES actor.org_unit (id) -); - -ALTER TABLE config.ui_staff_portal_page_entry ADD CONSTRAINT cusppe_entry_type_fkey - FOREIGN KEY (entry_type) REFERENCES config.ui_staff_portal_page_entry_type(code) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; -ALTER TABLE config.ui_staff_portal_page_entry ADD CONSTRAINT cusppe_owner_fkey - FOREIGN KEY (owner) REFERENCES actor.org_unit(id) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; - -COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/YYYY.data.default_portal_page.sql b/Open-ILS/src/sql/Pg/upgrade/YYYY.data.default_portal_page.sql deleted file mode 100644 index 4dbdd5202f..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/YYYY.data.default_portal_page.sql +++ /dev/null @@ -1,34 +0,0 @@ -BEGIN; - -INSERT INTO config.ui_staff_portal_page_entry - (id, page_col, col_pos, entry_type, label, image_url, target_url, owner) -VALUES - ( 1, 1, 0, 'header', oils_i18n_gettext( 1, 'Circulation and Patrons', 'cusppe', 'label'), NULL, NULL, 1) -, ( 2, 1, 1, 'menuitem', oils_i18n_gettext( 2, 'Check Out Items', 'cusppe', 'label'), '/images/portal/forward.png', '/eg/staff/circ/patron/bcsearch', 1) -, ( 3, 1, 2, 'menuitem', oils_i18n_gettext( 3, 'Check In Items', 'cusppe', 'label'), '/images/portal/back.png', '/eg/staff/circ/checkin/index', 1) -, ( 4, 1, 3, 'menuitem', oils_i18n_gettext( 4, 'Search For Patron By Name', 'cusppe', 'label'), '/images/portal/retreivepatron.png', '/eg/staff/circ/patron/search', 1) -, ( 5, 2, 0, 'header', oils_i18n_gettext( 5, 'Item Search and Cataloging', 'cusppe', 'label'), NULL, NULL, 1) -, ( 6, 2, 1, 'catalogsearch', oils_i18n_gettext( 6, 'Search Catalog', 'cusppe', 'label'), NULL, NULL, 1) -, ( 7, 2, 2, 'menuitem', oils_i18n_gettext( 7, 'Record Buckets', 'cusppe', 'label'), '/images/portal/bucket.png', '/eg/staff/cat/bucket/record/', 1) -, ( 8, 2, 3, 'menuitem', oils_i18n_gettext( 8, 'Item Buckets', 'cusppe', 'label'), '/images/portal/bucket.png', '/eg/staff/cat/bucket/copy/', 1) -, ( 9, 3, 0, 'header', oils_i18n_gettext( 9, 'Administration', 'cusppe', 'label'), NULL, NULL, 1) -, (10, 3, 1, 'link', oils_i18n_gettext(10, 'Evergreen Documentation', 'cusppe', 'label'), '/images/portal/helpdesk.png', 'https://docs.evergreen-ils.org', 1) -, (11, 3, 2, 'menuitem', oils_i18n_gettext(11, 'Workstation Administration', 'cusppe', 'label'), '/images/portal/helpdesk.png', '/eg/staff/admin/workstation/index', 1) -, (12, 3, 3, 'menuitem', oils_i18n_gettext(12, 'Reports', 'cusppe', 'label'), '/images/portal/reports.png', '/eg/staff/reporter/legacy/main', 1) -; - -SELECT setval('config.ui_staff_portal_page_entry_id_seq', 100); - - -INSERT INTO config.workstation_setting_type (name, grp, datatype, label) -VALUES ( - 'eg.grid.admin.config.ui_staff_portal_page_entry', 'gui', 'object', - oils_i18n_gettext( - 'eg.grid.admin.config.ui_staff_portal_page_entry', - 'Grid Config: admin.config.ui_staff_portal_page_entry', - 'cwst', 'label' - ) -); - -COMMIT; - diff --git a/Open-ILS/src/sql/Pg/upgrade/ZZZZ.data.portal_admin_perm.sql b/Open-ILS/src/sql/Pg/upgrade/ZZZZ.data.portal_admin_perm.sql deleted file mode 100644 index c9cbf209a7..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/ZZZZ.data.portal_admin_perm.sql +++ /dev/null @@ -1,8 +0,0 @@ -BEGIN; - -INSERT INTO permission.perm_list ( id, code, description ) VALUES -( 636, 'ADMIN_STAFF_PORTAL_PAGE', oils_i18n_gettext( 636, - 'Update the staff client portal page', 'ppl', 'description' )) -; - -COMMIT;