From: Lebbeous Fogle-Weekley Date: Tue, 31 Jan 2012 19:56:56 +0000 (-0500) Subject: Upgrade script finalization, adding new perm to database X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3391572ff63fab77b163b3567aaa04599ebe4430;p=contrib%2FConifer.git Upgrade script finalization, adding new perm to database Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 4672bac82b..9914d607b8 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -86,7 +86,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 ('0673', :eg_version); -- berick/senator +INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0674', :eg_version); -- phasefx/Dyrcona/senator CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 220e472ea7..4445f863c4 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -1527,7 +1527,9 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES ( 518, 'COPY_HOLDS_RECALL', oils_i18n_gettext( 518, 'Allow a user to place a cataloging recall on a specific copy', 'ppl', 'description' )), ( 519, 'ADMIN_SMS_CARRIER', oils_i18n_gettext( 519, - 'Allows a user to add/create/delete SMS Carrier entries.', 'ppl', 'description' )); + 'Allows a user to add/create/delete SMS Carrier entries.', 'ppl', 'description' )), + ( 520, 'COPY_DELETE_WARNING.override', oils_i18n_gettext( 520, + 'Allow a user to override warnings about deleting copies in problematic situations.', 'ppl', 'description' )); SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000); diff --git a/Open-ILS/src/sql/Pg/upgrade/0674.config.copy_status.restrict_copy_delete.sql b/Open-ILS/src/sql/Pg/upgrade/0674.config.copy_status.restrict_copy_delete.sql new file mode 100644 index 0000000000..b7364c9ac9 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0674.config.copy_status.restrict_copy_delete.sql @@ -0,0 +1,18 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('0674', :eg_version); + +ALTER TABLE config.copy_status + ADD COLUMN restrict_copy_delete BOOL NOT NULL DEFAULT FALSE; + +UPDATE config.copy_status +SET restrict_copy_delete = TRUE +WHERE id IN (1,3,6,8); + +INSERT INTO permission.perm_list (id, code, description) VALUES ( + 520, + 'COPY_DELETE_WARNING.override', + 'Allow a user to override warnings about deleting copies in problematic situations.' +); + +COMMIT; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.config.copy_status.restrict_copy_delete.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.config.copy_status.restrict_copy_delete.sql deleted file mode 100644 index e91aed21c9..0000000000 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.config.copy_status.restrict_copy_delete.sql +++ /dev/null @@ -1,10 +0,0 @@ -BEGIN; - -ALTER TABLE config.copy_status - ADD COLUMN restrict_copy_delete BOOL NOT NULL DEFAULT FALSE; - -UPDATE config.copy_status -SET restrict_copy_delete = TRUE -WHERE id IN (1,3,6,8); - -COMMIT;