[open-ils-commits] r14651 - trunk/Open-ILS/src/sql/Pg (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Oct 28 12:57:12 EDT 2009
Author: scottmk
Date: 2009-10-28 12:57:09 -0400 (Wed, 28 Oct 2009)
New Revision: 14651
Modified:
trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql
Log:
Add CREATE statement for asset.copy_location_order
M Pg/040.schema.asset.sql
Modified: trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql 2009-10-28 15:59:14 UTC (rev 14650)
+++ trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql 2009-10-28 16:57:09 UTC (rev 14651)
@@ -32,6 +32,21 @@
CONSTRAINT acl_name_once_per_lib UNIQUE (name, owning_lib)
);
+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 )
+);
+
CREATE TABLE asset.copy (
id BIGSERIAL PRIMARY KEY,
circ_lib INT NOT NULL REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
More information about the open-ils-commits
mailing list