[open-ils-commits] r14631 - in trunk/Open-ILS/src/sql/Pg: . upgrade (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Oct 27 15:01:14 EDT 2009
Author: miker
Date: 2009-10-27 15:01:09 -0400 (Tue, 27 Oct 2009)
New Revision: 14631
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0058.schema.permission-columns-for-org-setting-types.sql
Modified:
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/800.fkeys.sql
Log:
add view and change permission slots to config.org_unit_setting_type, for controlling access to specific ou settings
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-10-27 18:12:07 UTC (rev 14630)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-10-27 19:01:09 UTC (rev 14631)
@@ -51,7 +51,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0057'); -- senator
+INSERT INTO config.upgrade_log (version) VALUES ('0058'); -- miker
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
@@ -548,6 +548,8 @@
description TEXT,
datatype TEXT NOT NULL DEFAULT 'string',
fm_class TEXT,
+ view_perm INT,
+ update_perm INT,
--
-- define valid datatypes
--
Modified: trunk/Open-ILS/src/sql/Pg/800.fkeys.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/800.fkeys.sql 2009-10-27 18:12:07 UTC (rev 14630)
+++ trunk/Open-ILS/src/sql/Pg/800.fkeys.sql 2009-10-27 19:01:09 UTC (rev 14631)
@@ -97,4 +97,7 @@
ALTER TABLE config.billing_type ADD CONSTRAINT config_billing_type_owner_fkey FOREIGN KEY (owner) REFERENCES actor.org_unit (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE config.org_unit_setting_type ADD CONSTRAINT view_perm_fkey FOREIGN KEY (view_perm) REFERENCES permission.perm_list (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE config.org_unit_setting_type ADD CONSTRAINT update_perm_fkey FOREIGN KEY (update_perm) REFERENCES permission.perm_list (id) ON DELETE SET NULL CASCADE DEFERRABLE INITIALLY DEFERRED;
+
COMMIT;
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0058.schema.permission-columns-for-org-setting-types.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0058.schema.permission-columns-for-org-setting-types.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0058.schema.permission-columns-for-org-setting-types.sql 2009-10-27 19:01:09 UTC (rev 14631)
@@ -0,0 +1,9 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0058'); -- miker
+
+ALTER TABLE config.org_unit_setting_type ADD COLUMN view_perm INT REFERENCES permission.perm_list (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE config.org_unit_setting_type ADD COLUMN update_perm INT REFERENCES permission.perm_list (id) ON DELETE SET NULL CASCADE DEFERRABLE INITIALLY DEFERRED;
+
+COMMIT;
+
More information about the open-ils-commits
mailing list