[open-ils-commits] r14585 - in trunk/Open-ILS: examples src/sql/Pg src/sql/Pg/upgrade (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Oct 23 16:45:26 EDT 2009
Author: scottmk
Date: 2009-10-23 16:45:20 -0400 (Fri, 23 Oct 2009)
New Revision: 14585
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0052.schema.asset_copy_location_order.sql
Modified:
trunk/Open-ILS/examples/fm_IDL.xml
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
Log:
Create new table asset.copy_location_order, and a new permission
for administering it.
M Open-ILS/src/sql/Pg/002.schema.config.sql
A Open-ILS/src/sql/Pg/upgrade/0052.schema.asset_copy_location_order.sql
M Open-ILS/src/sql/Pg/950.data.seed-values.sql
M Open-ILS/examples/fm_IDL.xml
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2009-10-23 18:47:39 UTC (rev 14584)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2009-10-23 20:45:20 UTC (rev 14585)
@@ -2386,6 +2386,28 @@
</actions>
</permacrud>
</class>
+
+ <class id="acplo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_order" oils_persist:tablename="asset.copy_location_order" reporter:label="Copy/Shelving Location Order">
+ <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
+ <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
+ <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
+ <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
+ <field reporter:label="Position" name="position" reporter:datatype="int"/>
+ </fields>
+ <links>
+ <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
+ <link field="org" reltype="has_a" key="id" map="" class="aou"/>
+ </links>
+ <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
+ <actions>
+ <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
+ <retrieve/>
+ <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
+ <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
+ </actions>
+ </permacrud>
+ </class>
+
<class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
<fields>
<field name="id" oils_persist:virtual="true" />
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-10-23 18:47:39 UTC (rev 14584)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-10-23 20:45:20 UTC (rev 14585)
@@ -51,7 +51,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0051'); -- berick
+INSERT INTO config.upgrade_log (version) VALUES ('0052'); -- Scott McKellar
CREATE TABLE config.bib_source (
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-10-23 18:47:39 UTC (rev 14584)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-10-23 20:45:20 UTC (rev 14585)
@@ -1229,7 +1229,8 @@
(346,'UPDATE_BILL_NOTE', oils_i18n_gettext(346,'Allows staff to edit the note for a bill on a transaction', 'ppl', 'description')),
(347,'UPDATE_PAYMENT_NOTE', oils_i18n_gettext(347,'Allows staff to edit the note for a payment on a transaction', 'ppl', 'description')),
(348, 'UPDATE_RECORD', oils_i18n_gettext(348, 'Allow a user to update and undelete records.', 'ppl', 'description')),
- (349, 'UPDATE_PATRON_CLAIM_NEVER_CHECKED_OUT_COUNT', oils_i18n_gettext(349,'Allows staff to manually change a patron''s claims never checkout out count', 'ppl', 'description'));
+ (349, 'UPDATE_PATRON_CLAIM_NEVER_CHECKED_OUT_COUNT', oils_i18n_gettext(349,'Allows staff to manually change a patron''s claims never checkout out count', 'ppl', 'description')),
+ (350, 'ADMIN_COPY_LOCATION_ORDER', oils_i18n_gettext(350, 'Allow a user to create/view/update/delete a copy location order', 'ppl', 'description'));
SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0052.schema.asset_copy_location_order.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0052.schema.asset_copy_location_order.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0052.schema.asset_copy_location_order.sql 2009-10-23 20:45:20 UTC (rev 14585)
@@ -0,0 +1,21 @@
+INSERT INTO config.upgrade_log (version) VALUES ('0052');
+
+CREATE TABLE asset.copy_location_order
+(
+ id SERIAL PRIMARY KEY,
+ location INT NOT NULL
+ REFERENCES asset.copy_location
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ org INT NOT NULL
+ REFERENCES actor.org_unit
+ ON DELETE CASCADE
+ DEFERRABLE INITIALLY DEFERRED,
+ position INT NOT NULL DEFAULT 0,
+ CONSTRAINT acplo_once_per_org UNIQUE ( location, org )
+);
+
+INSERT INTO permission.perm_list VALUES
+(350, 'ADMIN_COPY_LOCATION_ORDER', oils_i18n_gettext(350, 'Allow a user to create/view/update/delete a copy location order', 'ppl', 'description'));
+
+COMMIT;
More information about the open-ils-commits
mailing list