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 ('1216', :eg_version); -- berick/sandbergja
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1219', :eg_version); -- gmcharlt/berick
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1217', :eg_version);
+
+INSERT INTO config.workstation_setting_type
+ (name, grp, datatype, label)
+VALUES (
+ 'eg.acq.search.default.lineitems', 'gui', 'object',
+ oils_i18n_gettext(
+ 'eg.acq.search.default.lineitems',
+ 'Acquisitions Default Search: Lineitems',
+ 'cwst', 'label')
+), (
+ 'eg.acq.search.default.purchaseorders', 'gui', 'object',
+ oils_i18n_gettext(
+ 'eg.acq.search.default.purchaseorders',
+ 'Acquisitions Default Search: Purchase Orders',
+ 'cwst', 'label')
+), (
+ 'eg.acq.search.default.invoices', 'gui', 'object',
+ oils_i18n_gettext(
+ 'eg.acq.search.default.invoices',
+ 'Acquisitions Default Search: Invoices',
+ 'cwst', 'label')
+), (
+ 'eg.acq.search.default.selectionlists', 'gui', 'object',
+ oils_i18n_gettext(
+ 'eg.acq.search.default.selectionlists',
+ 'Acquisitions Default Search: Selection Lists',
+ 'cwst', 'label')
+);
+
+INSERT INTO config.workstation_setting_type
+ (name, grp, datatype, label)
+VALUES (
+ 'eg.acq.search.lineitems.run_immediately', 'gui', 'bool',
+ oils_i18n_gettext(
+ 'eg.acq.search.lineitems.run_immediately',
+ 'Acquisitions Search: Immediately Search Lineitems',
+ 'cwst', 'label')
+), (
+ 'eg.acq.search.purchaseorders.run_immediately', 'gui', 'bool',
+ oils_i18n_gettext(
+ 'eg.acq.search.purchaseorders.run_immediately',
+ 'Acquisitions Search: Immediately Search Purchase Orders',
+ 'cwst', 'label')
+), (
+ 'eg.acq.search.invoices.run_immediately', 'gui', 'bool',
+ oils_i18n_gettext(
+ 'eg.acq.search.invoices.run_immediately',
+ 'Acquisitions Search: Immediately Search Invoices',
+ 'cwst', 'label')
+), (
+ 'eg.acq.search.selectionlists.run_immediately', 'gui', 'bool',
+ oils_i18n_gettext(
+ 'eg.acq.search.selectionlists.run_immediately',
+ 'Acquisitions Search: Immediately Search Selection Lists',
+ 'cwst', 'label')
+);
+
+INSERT INTO config.workstation_setting_type
+ (name, grp, datatype, label)
+VALUES (
+ 'eg.grid.acq.search.lineitems', 'gui', 'object',
+ oils_i18n_gettext(
+ 'eg.grid.acq.search.lineitems',
+ 'Grid Config: acq.search.lineitems',
+ 'cwst', 'label')
+), (
+ 'eg.grid.acq.search.purchaseorders', 'gui', 'object',
+ oils_i18n_gettext(
+ 'eg.grid.acq.search.purchaseorders',
+ 'Grid Config: acq.search.purchaseorders',
+ 'cwst', 'label')
+), (
+ 'eg.grid.acq.search.selectionlists', 'gui', 'object',
+ oils_i18n_gettext(
+ 'eg.grid.acq.search.selectionlists',
+ 'Grid Config: acq.search.selectionlists',
+ 'cwst', 'label')
+), (
+ 'eg.grid.acq.search.invoices', 'gui', 'object',
+ oils_i18n_gettext(
+ 'eg.grid.acq.search.invoices',
+ 'Grid Config: acq.search.invoices',
+ 'cwst', 'label')
+);
+
+COMMIT;
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1218', :eg_version);
+
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
+ SELECT
+ pgt.id, perm.id, aout.depth, TRUE
+ FROM
+ permission.grp_tree pgt,
+ permission.perm_list perm,
+ actor.org_unit_type aout
+ WHERE
+ pgt.name = 'Acquisitions Administrator' AND
+ aout.name = 'Consortium' AND
+ perm.code IN (
+ 'VIEW_FUND',
+ 'VIEW_FUNDING_SOURCE',
+ 'VIEW_FUND_ALLOCATION',
+ 'VIEW_PICKLIST',
+ 'VIEW_PROVIDER',
+ 'VIEW_PURCHASE_ORDER',
+ 'VIEW_INVOICE',
+ 'CREATE_PICKLIST',
+ 'ACQ_ADD_LINEITEM_IDENTIFIER',
+ 'ACQ_SET_LINEITEM_IDENTIFIER',
+ 'MANAGE_FUND',
+ 'CREATE_INVOICE',
+ 'CREATE_PURCHASE_ORDER',
+ 'IMPORT_ACQ_LINEITEM_BIB_RECORD',
+ 'IMPORT_ACQ_LINEITEM_BIB_RECORD_UPLOAD',
+ 'MANAGE_CLAIM',
+ 'MANAGE_PROVIDER',
+ 'MANAGE_FUNDING_SOURCE',
+ 'RECEIVE_PURCHASE_ORDER',
+ 'ADMIN_ACQ_LINEITEM_ALERT_TEXT',
+ 'UPDATE_FUNDING_SOURCE',
+ 'UPDATE_PROVIDER',
+ 'VIEW_IMPORT_MATCH_SET',
+ 'VIEW_MERGE_PROFILE',
+ 'IMPORT_MARC'
+ );
+
+
+INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
+ SELECT
+ pgt.id, perm.id, aout.depth, FALSE
+ FROM
+ permission.grp_tree pgt,
+ permission.perm_list perm,
+ actor.org_unit_type aout
+ WHERE
+ pgt.name = 'Acquisitions' AND
+ aout.name = 'Consortium' AND
+ perm.code IN (
+ 'ACQ_ADD_LINEITEM_IDENTIFIER',
+ 'ACQ_SET_LINEITEM_IDENTIFIER',
+ 'ADMIN_ACQ_FUND',
+ 'ADMIN_FUND',
+ 'ACQ_INVOICE-REOPEN',
+ 'ADMIN_ACQ_DISTRIB_FORMULA',
+ 'ADMIN_INVOICE',
+ 'IMPORT_ACQ_LINEITEM_BIB_RECORD_UPLOAD',
+ 'VIEW_IMPORT_MATCH_SET',
+ 'VIEW_MERGE_PROFILE'
+ );
+
+COMMIT;
--- /dev/null
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('1219', :eg_version);
+
+CREATE VIEW acq.li_state_label AS
+ SELECT *
+ FROM (VALUES
+ ('new', 'New'),
+ ('selector-ready', 'Selector-Ready'),
+ ('order-ready', 'Order-Ready'),
+ ('approved', 'Approved'),
+ ('pending-order', 'Pending-Order'),
+ ('on-order', 'On-Order'),
+ ('received', 'Received'),
+ ('cancelled', 'Cancelled')
+ ) AS t (id,label);
+
+CREATE VIEW acq.po_state_label AS
+ SELECT *
+ FROM (VALUES
+ ('new', 'New'),
+ ('pending', 'Pending'),
+ ('on-order', 'On-Order'),
+ ('received', 'Received'),
+ ('cancelled', 'Cancelled')
+ ) AS t (id,label);
+
+COMMIT;
+++ /dev/null
-BEGIN;
-
--- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-INSERT INTO config.workstation_setting_type
- (name, grp, datatype, label)
-VALUES (
- 'eg.acq.search.default.lineitems', 'gui', 'object',
- oils_i18n_gettext(
- 'eg.acq.search.default.lineitems',
- 'Acquisitions Default Search: Lineitems',
- 'cwst', 'label')
-), (
- 'eg.acq.search.default.purchaseorders', 'gui', 'object',
- oils_i18n_gettext(
- 'eg.acq.search.default.purchaseorders',
- 'Acquisitions Default Search: Purchase Orders',
- 'cwst', 'label')
-), (
- 'eg.acq.search.default.invoices', 'gui', 'object',
- oils_i18n_gettext(
- 'eg.acq.search.default.invoices',
- 'Acquisitions Default Search: Invoices',
- 'cwst', 'label')
-), (
- 'eg.acq.search.default.selectionlists', 'gui', 'object',
- oils_i18n_gettext(
- 'eg.acq.search.default.selectionlists',
- 'Acquisitions Default Search: Selection Lists',
- 'cwst', 'label')
-);
-
-INSERT INTO config.workstation_setting_type
- (name, grp, datatype, label)
-VALUES (
- 'eg.acq.search.lineitems.run_immediately', 'gui', 'bool',
- oils_i18n_gettext(
- 'eg.acq.search.lineitems.run_immediately',
- 'Acquisitions Search: Immediately Search Lineitems',
- 'cwst', 'label')
-), (
- 'eg.acq.search.purchaseorders.run_immediately', 'gui', 'bool',
- oils_i18n_gettext(
- 'eg.acq.search.purchaseorders.run_immediately',
- 'Acquisitions Search: Immediately Search Purchase Orders',
- 'cwst', 'label')
-), (
- 'eg.acq.search.invoices.run_immediately', 'gui', 'bool',
- oils_i18n_gettext(
- 'eg.acq.search.invoices.run_immediately',
- 'Acquisitions Search: Immediately Search Invoices',
- 'cwst', 'label')
-), (
- 'eg.acq.search.selectionlists.run_immediately', 'gui', 'bool',
- oils_i18n_gettext(
- 'eg.acq.search.selectionlists.run_immediately',
- 'Acquisitions Search: Immediately Search Selection Lists',
- 'cwst', 'label')
-);
-
-INSERT INTO config.workstation_setting_type
- (name, grp, datatype, label)
-VALUES (
- 'eg.grid.acq.search.lineitems', 'gui', 'object',
- oils_i18n_gettext(
- 'eg.grid.acq.search.lineitems',
- 'Grid Config: acq.search.lineitems',
- 'cwst', 'label')
-), (
- 'eg.grid.acq.search.purchaseorders', 'gui', 'object',
- oils_i18n_gettext(
- 'eg.grid.acq.search.purchaseorders',
- 'Grid Config: acq.search.purchaseorders',
- 'cwst', 'label')
-), (
- 'eg.grid.acq.search.selectionlists', 'gui', 'object',
- oils_i18n_gettext(
- 'eg.grid.acq.search.selectionlists',
- 'Grid Config: acq.search.selectionlists',
- 'cwst', 'label')
-), (
- 'eg.grid.acq.search.invoices', 'gui', 'object',
- oils_i18n_gettext(
- 'eg.grid.acq.search.invoices',
- 'Grid Config: acq.search.invoices',
- 'cwst', 'label')
-);
-
-COMMIT;
+++ /dev/null
-BEGIN;
-
-INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
- SELECT
- pgt.id, perm.id, aout.depth, TRUE
- FROM
- permission.grp_tree pgt,
- permission.perm_list perm,
- actor.org_unit_type aout
- WHERE
- pgt.name = 'Acquisitions Administrator' AND
- aout.name = 'Consortium' AND
- perm.code IN (
- 'VIEW_FUND',
- 'VIEW_FUNDING_SOURCE',
- 'VIEW_FUND_ALLOCATION',
- 'VIEW_PICKLIST',
- 'VIEW_PROVIDER',
- 'VIEW_PURCHASE_ORDER',
- 'VIEW_INVOICE',
- 'CREATE_PICKLIST',
- 'ACQ_ADD_LINEITEM_IDENTIFIER',
- 'ACQ_SET_LINEITEM_IDENTIFIER',
- 'MANAGE_FUND',
- 'CREATE_INVOICE',
- 'CREATE_PURCHASE_ORDER',
- 'IMPORT_ACQ_LINEITEM_BIB_RECORD',
- 'IMPORT_ACQ_LINEITEM_BIB_RECORD_UPLOAD',
- 'MANAGE_CLAIM',
- 'MANAGE_PROVIDER',
- 'MANAGE_FUNDING_SOURCE',
- 'RECEIVE_PURCHASE_ORDER',
- 'ADMIN_ACQ_LINEITEM_ALERT_TEXT',
- 'UPDATE_FUNDING_SOURCE',
- 'UPDATE_PROVIDER',
- 'VIEW_IMPORT_MATCH_SET',
- 'VIEW_MERGE_PROFILE',
- 'IMPORT_MARC'
- );
-
-
-INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable)
- SELECT
- pgt.id, perm.id, aout.depth, FALSE
- FROM
- permission.grp_tree pgt,
- permission.perm_list perm,
- actor.org_unit_type aout
- WHERE
- pgt.name = 'Acquisitions' AND
- aout.name = 'Consortium' AND
- perm.code IN (
- 'ACQ_ADD_LINEITEM_IDENTIFIER',
- 'ACQ_SET_LINEITEM_IDENTIFIER',
- 'ADMIN_ACQ_FUND',
- 'ADMIN_FUND',
- 'ACQ_INVOICE-REOPEN',
- 'ADMIN_ACQ_DISTRIB_FORMULA',
- 'ADMIN_INVOICE',
- 'IMPORT_ACQ_LINEITEM_BIB_RECORD_UPLOAD',
- 'VIEW_IMPORT_MATCH_SET',
- 'VIEW_MERGE_PROFILE'
- );
-
-COMMIT;
+++ /dev/null
-BEGIN;
-
--- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
-
-CREATE VIEW acq.li_state_label AS
- SELECT *
- FROM (VALUES
- ('new', 'New'),
- ('selector-ready', 'Selector-Ready'),
- ('order-ready', 'Order-Ready'),
- ('approved', 'Approved'),
- ('pending-order', 'Pending-Order'),
- ('on-order', 'On-Order'),
- ('received', 'Received'),
- ('cancelled', 'Cancelled')
- ) AS t (id,label);
-
-CREATE VIEW acq.po_state_label AS
- SELECT *
- FROM (VALUES
- ('new', 'New'),
- ('pending', 'Pending'),
- ('on-order', 'On-Order'),
- ('received', 'Received'),
- ('cancelled', 'Cancelled')
- ) AS t (id,label);
-
-COMMIT;