[open-ils-commits] r18495 - in trunk/Open-ILS/src/sql/Pg: . upgrade (gmc)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Oct 27 12:51:19 EDT 2010
Author: gmc
Date: 2010-10-27 12:51:15 -0400 (Wed, 27 Oct 2010)
New Revision: 18495
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0447.data.remove-extra-local-avail-settings.sql
Modified:
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
Log:
remove unused settings and permission
circ.holds.alert_if_local_avail and circ.holds.deny_if_local_avail
are redundant; circ.holds.hold_has_copy_at.{alert|block} are the
settings that will actually be used. Also remove a related,
redundant permission.
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-10-27 16:45:39 UTC (rev 18494)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-10-27 16:51:15 UTC (rev 18495)
@@ -70,7 +70,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0446'); -- gmc
+INSERT INTO config.upgrade_log (version) VALUES ('0447'); -- gmc
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Modified: trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql 2010-10-27 16:45:39 UTC (rev 18494)
+++ trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql 2010-10-27 16:51:15 UTC (rev 18495)
@@ -945,8 +945,6 @@
'Allow a user to delete trigger validators' );
INSERT INTO permission.temp_perm ( id, code, description ) VALUES ( 374, 'UPDATE_TRIGGER_VALIDATOR',
'Allow a user to update trigger validators' );
-INSERT INTO permission.temp_perm ( id, code, description ) VALUES ( 375, 'HOLD_LOCAL_AVAIL_OVERRIDE',
- 'Allow a user to place a hold despite the availability of a local copy' );
INSERT INTO permission.temp_perm ( id, code, description ) VALUES ( 376, 'ADMIN_BOOKING_RESOURCE',
'Enables the user to create/update/delete booking resources' );
INSERT INTO permission.temp_perm ( id, code, description ) VALUES ( 377, 'ADMIN_BOOKING_RESOURCE_TYPE',
@@ -2149,19 +2147,6 @@
'integer'
);
-INSERT INTO config.org_unit_setting_type (name, label, description, datatype)
- VALUES
- ('circ.holds.alert_if_local_avail',
- 'Holds: Local available alert',
- 'If local copy is available, alert the person making the hold',
- 'bool'),
-
- ('circ.holds.deny_if_local_avail',
- 'Holds: Local available block',
- 'If local copy is available, deny the creation of the hold',
- 'bool')
- ;
-
INSERT INTO config.org_unit_setting_type ( name, label, description, datatype )
VALUES (
'circ.holds.clear_shelf.no_capture_holds',
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2010-10-27 16:45:39 UTC (rev 18494)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2010-10-27 16:51:15 UTC (rev 18495)
@@ -1338,8 +1338,6 @@
(350, 'ADMIN_COPY_LOCATION_ORDER', oils_i18n_gettext(350, 'Allow a user to create/view/update/delete a copy location order', 'ppl', 'description')),
-- additional permissions
- (351, 'HOLD_LOCAL_AVAIL_OVERRIDE', oils_i18n_gettext(351, 'Allow a user to place a hold despite the availability of a local copy', 'ppl', 'description')),
-
(352, 'ADMIN_BOOKING_RESOURCE', oils_i18n_gettext(352, 'Enables the user to create/update/delete booking resources', 'ppl', 'description')),
(353, 'ADMIN_BOOKING_RESOURCE_TYPE', oils_i18n_gettext(353, 'Enables the user to create/update/delete booking resource types', 'ppl', 'description')),
(354, 'ADMIN_BOOKING_RESOURCE_ATTR', oils_i18n_gettext(354, 'Enables the user to create/update/delete booking resource attributes', 'ppl', 'description')),
@@ -6742,20 +6740,6 @@
INSERT INTO config.org_unit_setting_type (name, label, description, datatype)
VALUES
- ('circ.holds.alert_if_local_avail',
- oils_i18n_gettext('circ.holds.alert_if_local_avail',
- 'Holds: Local available alert', 'coust', 'label'),
- oils_i18n_gettext('circ.holds.alert_if_local_avail',
- 'If local copy is available, alert the person making the hold', 'coust', 'description'),
- 'bool'),
-
- ('circ.holds.deny_if_local_avail',
- oils_i18n_gettext('circ.holds.deny_if_local_avail',
- 'Holds: Local available block', 'coust', 'label'),
- oils_i18n_gettext('circ.holds.deny_if_local_avail',
- 'If local copy is available, deny the creation of the hold', 'coust', 'description'),
- 'bool'),
-
('circ.holds.clear_shelf.no_capture_holds',
oils_i18n_gettext( 'circ.holds.clear_shelf.no_capture_holds',
'Holds: Bypass hold capture during clear shelf process', 'coust', 'label'),
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0447.data.remove-extra-local-avail-settings.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0447.data.remove-extra-local-avail-settings.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0447.data.remove-extra-local-avail-settings.sql 2010-10-27 16:51:15 UTC (rev 18495)
@@ -0,0 +1,22 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0447'); -- gmc
+
+-- undo 0077.data.holds_local_avail_and_override.sql
+DELETE FROM actor.org_unit_setting WHERE name IN (
+ 'circ.holds.alert_if_local_avail',
+ 'circ.holds.deny_if_local_avail'
+);
+DELETE FROM config.org_unit_setting_type WHERE name IN (
+ 'circ.holds.alert_if_local_avail',
+ 'circ.holds.deny_if_local_avail'
+);
+DELETE FROM permission.usr_perm_map WHERE perm = (
+ SELECT id FROM permission.perm_list WHERE code = 'HOLD_LOCAL_AVAIL_OVERRIDE'
+);
+DELETE FROM permission.grp_perm_map WHERE perm = (
+ SELECT id FROM permission.perm_list WHERE code = 'HOLD_LOCAL_AVAIL_OVERRIDE'
+);
+DELETE FROM permission.perm_list WHERE code = 'HOLD_LOCAL_AVAIL_OVERRIDE';
+
+COMMIT;
More information about the open-ils-commits
mailing list