From: scottmk Date: Fri, 23 Oct 2009 20:45:20 +0000 (+0000) Subject: Create new table asset.copy_location_order, and a new permission X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6917fedab91c75394f92c51e7dfe9cb1d752c003;p=evergreen%2Fpines.git 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 git-svn-id: svn://svn.open-ils.org/ILS/trunk@14585 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 4cffee95dd..de507e3a06 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -2386,6 +2386,28 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index fca83223a1..9f938ba416 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -51,7 +51,7 @@ CREATE TABLE config.upgrade_log ( 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 ( 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 7f80ded508..65af80f3d5 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -1229,7 +1229,8 @@ INSERT INTO permission.perm_list VALUES (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); diff --git a/Open-ILS/src/sql/Pg/upgrade/0052.schema.asset_copy_location_order.sql b/Open-ILS/src/sql/Pg/upgrade/0052.schema.asset_copy_location_order.sql new file mode 100644 index 0000000000..2a037ee17f --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0052.schema.asset_copy_location_order.sql @@ -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;