[open-ils-commits] r16094 - in trunk/Open-ILS: examples src/perlmods/OpenILS/Application/Storage/CDBI src/sql/Pg src/sql/Pg/upgrade (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Apr 1 15:21:05 EDT 2010
Author: miker
Date: 2010-04-01 15:21:01 -0400 (Thu, 01 Apr 2010)
New Revision: 16094
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0225.schema.record_ownership.sql
Modified:
trunk/Open-ILS/examples/fm_IDL.xml
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/biblio.pm
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/010.schema.biblio.sql
trunk/Open-ILS/src/sql/Pg/800.fkeys.sql
Log:
fields for supporting bib record ownership and sharing
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2010-04-01 19:09:34 UTC (rev 16093)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2010-04-01 19:21:01 UTC (rev 16094)
@@ -1702,6 +1702,8 @@
<field reporter:label="Record Source" name="source" reporter:datatype="link"/>
<field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
<field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
+ <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
+ <field reporter:label="Share Depth" name="share_depth" reporter:datatype="int"/>
<field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
@@ -1714,6 +1716,7 @@
<field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
</fields>
<links>
+ <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
<link field="editor" reltype="has_a" key="id" map="" class="au"/>
<link field="creator" reltype="has_a" key="id" map="" class="au"/>
<link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/biblio.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/biblio.pm 2010-04-01 19:09:34 UTC (rev 16093)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/biblio.pm 2010-04-01 19:21:01 UTC (rev 16094)
@@ -10,7 +10,7 @@
biblio::record_entry->table( 'biblio_record_entry' );
biblio::record_entry->columns( Essential => qw/id tcn_source tcn_value creator editor
- create_date edit_date source active quality
+ create_date edit_date source active quality owner share_depth
deleted marc last_xact_id fingerprint/ );
#-------------------------------------------------------------------------------
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-04-01 19:09:34 UTC (rev 16093)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-04-01 19:21:01 UTC (rev 16094)
@@ -60,7 +60,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0224'); -- berick
+INSERT INTO config.upgrade_log (version) VALUES ('0225'); -- miker
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Modified: trunk/Open-ILS/src/sql/Pg/010.schema.biblio.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/010.schema.biblio.sql 2010-04-01 19:09:34 UTC (rev 16093)
+++ trunk/Open-ILS/src/sql/Pg/010.schema.biblio.sql 2010-04-01 19:21:01 UTC (rev 16094)
@@ -39,7 +39,9 @@
tcn_source TEXT NOT NULL DEFAULT 'AUTOGEN',
tcn_value TEXT NOT NULL DEFAULT biblio.next_autogen_tcn_value(),
marc TEXT NOT NULL,
- last_xact_id TEXT NOT NULL
+ last_xact_id TEXT NOT NULL,
+ owner INT,
+ share_depth INT
);
CREATE INDEX biblio_record_entry_creator_idx ON biblio.record_entry ( creator );
CREATE INDEX biblio_record_entry_create_date_idx ON biblio.record_entry ( create_date );
Modified: trunk/Open-ILS/src/sql/Pg/800.fkeys.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/800.fkeys.sql 2010-04-01 19:09:34 UTC (rev 16093)
+++ trunk/Open-ILS/src/sql/Pg/800.fkeys.sql 2010-04-01 19:21:01 UTC (rev 16094)
@@ -47,6 +47,7 @@
ALTER TABLE biblio.record_entry ADD CONSTRAINT biblio_record_entry_creator_fkey FOREIGN KEY (creator) REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE biblio.record_entry ADD CONSTRAINT biblio_record_entry_editor_fkey FOREIGN KEY (editor) REFERENCES actor.usr (id) DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE biblio.record_entry ADD CONSTRAINT biblio_record_entry_owner_fkey FOREIGN KEY (owner) REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE metabib.metarecord ADD CONSTRAINT metabib_metarecord_master_record_fkey FOREIGN KEY (master_record) REFERENCES biblio.record_entry (id) DEFERRABLE INITIALLY DEFERRED;
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0225.schema.record_ownership.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0225.schema.record_ownership.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0225.schema.record_ownership.sql 2010-04-01 19:21:01 UTC (rev 16094)
@@ -0,0 +1,13 @@
+
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0225');
+
+ALTER TABLE biblio.record_entry ADD COLUMN owner INT REFERENCES actor.org_unit (id);
+ALTER TABLE biblio.record_entry ADD COLUMN share_depth INT;
+
+ALTER TABLE auditor.biblio_record_entry_history ADD COLUMN owner INT;
+ALTER TABLE auditor.biblio_record_entry_history ADD COLUMN share_depth INT;
+
+COMMIT;
+
More information about the open-ils-commits
mailing list