[open-ils-commits] r15019 - in trunk/Open-ILS: examples src/sql/Pg src/sql/Pg/upgrade (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Nov 24 10:28:37 EST 2009
Author: miker
Date: 2009-11-24 10:28:34 -0500 (Tue, 24 Nov 2009)
New Revision: 15019
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0090.schema.booking.bib-base-types.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/095.schema.booking.sql
Log:
add explicit link from resource_type to biblio.record_entry
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2009-11-23 22:39:07 UTC (rev 15018)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2009-11-24 15:28:34 UTC (rev 15019)
@@ -2341,6 +2341,7 @@
<field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
<field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
<field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
+ <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
<field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
<field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
@@ -2348,6 +2349,7 @@
</fields>
<links>
<link field="owner" reltype="has_a" key="id" map="" class="aou"/>
+ <link field="record" reltype="has_a" key="id" map="" class="bre"/>
<link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
<link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
<link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-11-23 22:39:07 UTC (rev 15018)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-11-24 15:28:34 UTC (rev 15019)
@@ -51,7 +51,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0089'); -- berick
+INSERT INTO config.upgrade_log (version) VALUES ('0090'); -- miker
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Modified: trunk/Open-ILS/src/sql/Pg/095.schema.booking.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/095.schema.booking.sql 2009-11-23 22:39:07 UTC (rev 15018)
+++ trunk/Open-ILS/src/sql/Pg/095.schema.booking.sql 2009-11-24 15:28:34 UTC (rev 15019)
@@ -30,7 +30,9 @@
DEFERRABLE INITIALLY DEFERRED,
catalog_item BOOLEAN NOT NULL DEFAULT FALSE,
transferable BOOLEAN NOT NULL DEFAULT FALSE,
- CONSTRAINT brt_name_once_per_owner UNIQUE(owner, name)
+ record INT REFERENCES biblio.record_entry (id)
+ DEFERRABLE INITIALLY DEFERRED,
+ CONSTRAINT brt_name_once_per_owner UNIQUE(owner, name, record)
);
CREATE TABLE booking.resource (
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0090.schema.booking.bib-base-types.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0090.schema.booking.bib-base-types.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0090.schema.booking.bib-base-types.sql 2009-11-24 15:28:34 UTC (rev 15019)
@@ -0,0 +1,9 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0090'); -- miker
+
+ALTER TABLE booking.resource_type DROP CONSTRAINT brt_name_once_per_owner;
+ALTER TABLE booking.resource_type ADD COLUMN record BIGINT REFERENCES biblio.record_entry (id) DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE booking.resource_type ADD CONSTRAINT brt_name_or_record_once_per_owner UNIQUE(owner, name, record);
+
+COMMIT;
More information about the open-ils-commits
mailing list