<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"/>
<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"/>
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/ );
#-------------------------------------------------------------------------------
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,
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 );
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;
--- /dev/null
+
+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;
+