<field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
+ <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
<link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
<link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
<link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
+ <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
<link field="notes" reltype="has_many" key="record" map="" class="bren"/>
<link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
<link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
UNION ALL
SELECT * FROM metabib.keyword_field_entry
UNION ALL
+ SELECT * FROM metabib.identifier_field_entry
+ UNION ALL
SELECT * FROM metabib.title_field_entry
UNION ALL
SELECT * FROM metabib.subject_field_entry
UNION ALL
SELECT * FROM metabib.keyword_field_entry
UNION ALL
+ SELECT * FROM metabib.identifier_field_entry
+ UNION ALL
SELECT * FROM metabib.title_field_entry
UNION ALL
SELECT * FROM metabib.subject_field_entry
<link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
</links>
</class>
+ <class id="mife" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::identifier_field_entry" oils_persist:tablename="metabib.identifier_field_entry" reporter:label="Identifier Field Entry">
+ <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
+ <field name="field" reporter:datatype="link"/>
+ <field name="id" reporter:datatype="id" />
+ <field name="source" reporter:datatype="link"/>
+ <field name="value" reporter:datatype="text"/>
+ </fields>
+ <links>
+ <link field="source" reltype="has_a" key="id" map="" class="bre"/>
+ <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
+ </links>
+ </class>
<class id="mtfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::title_field_entry" oils_persist:tablename="metabib.title_field_entry" reporter:label="Title Field Entry">
<fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
<field name="field" reporter:datatype="link"/>
$cstore->request( 'open-ils.cstore.direct.metabib.record_descriptor.create' => $blob->{descriptor} )->gather(1);
# deal with classed fields...
- for my $class ( qw/title author subject keyword series/ ) {
+ for my $class ( qw/title author subject keyword series identifier/ ) {
$tmp = $cstore->request(
"open-ils.cstore.direct.metabib.${class}_field_entry.id_list.atomic",
{ source => $bib->id }
metabib::title_field_entry->has_a( source => 'biblio::record_entry' );
metabib::title_field_entry->has_a( field => 'config::metabib_field' );
+
+ metabib::identifier_field_entry->has_a( source => 'biblio::record_entry' );
+ metabib::identifier_field_entry->has_a( field => 'config::metabib_field' );
metabib::author_field_entry->has_a( source => 'biblio::record_entry' );
metabib::author_field_entry->has_a( field => 'config::metabib_field' );
biblio::record_entry->has_many( call_numbers => 'asset::call_number' );
biblio::record_entry->has_many( full_record_entries => 'metabib::full_rec' );
biblio::record_entry->has_many( title_field_entries => 'metabib::title_field_entry' );
+ biblio::record_entry->has_many( identifier_field_entries => 'metabib::identifier_field_entry' );
biblio::record_entry->has_many( author_field_entries => 'metabib::author_field_entry' );
biblio::record_entry->has_many( subject_field_entries => 'metabib::subject_field_entry' );
biblio::record_entry->has_many( keyword_field_entries => 'metabib::keyword_field_entry' );
metabib::metarecord->columns( Essential => qw/fingerprint master_record mods/ );
#-------------------------------------------------------------------------------
+package metabib::identifier_field_entry;
+use base qw/metabib/;
+
+metabib::identifier_field_entry->table( 'metabib_identifier_field_entry' );
+metabib::identifier_field_entry->columns( Primary => qw/id/ );
+metabib::identifier_field_entry->columns( Essential => qw/field value source/ );
+
+
+#-------------------------------------------------------------------------------
package metabib::title_field_entry;
use base qw/metabib/;
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
+ package metabib::identifier_field_entry;
+
+ metabib::identifier_field_entry->table( 'metabib.identifier_field_entry' );
+ metabib::identifier_field_entry->sequence( 'metabib.identifier_field_entry_id_seq' );
+ metabib::identifier_field_entry->columns( 'FTS' => 'index_vector' );
+
+ #-------------------------------------------------------------------------------
+
+ #-------------------------------------------------------------------------------
package metabib::title_field_entry;
metabib::title_field_entry->table( 'metabib.title_field_entry' );
}
return undef;
}
-for my $class ( qw/title author subject keyword series/ ) {
+for my $class ( qw/title author subject keyword series identifier/ ) {
__PACKAGE__->register_method(
api_name => "open-ils.storage.authority.$class.see_from.controlled",
method => 'find_see_from_controlled',
}
return undef;
}
-for my $class ( qw/title author subject keyword series/ ) {
+for my $class ( qw/title author subject keyword series identifier/ ) {
__PACKAGE__->register_method(
api_name => "open-ils.storage.authority.$class.see_also_from.controlled",
method => 'find_see_also_from_controlled',
return undef;
}
-for my $class ( qw/title author subject keyword series/ ) {
+for my $class ( qw/title author subject keyword series identifier/ ) {
__PACKAGE__->register_method(
api_name => "open-ils.storage.metabib.$class.search_fts.metarecord",
method => 'search_class_fts',
return $recs;
}
-for my $class ( qw/title author subject keyword series/ ) {
+for my $class ( qw/title author subject keyword series identifier/ ) {
__PACKAGE__->register_method(
api_name => "open-ils.storage.metabib.$class.search_fts.metarecord_count",
method => 'search_class_fts_count',
my @fts_ranks = $fts->fts_rank;
my %bonus = ();
- $bonus{'metabib::keyword_field_entry'} = [ { 'CASE WHEN f.value ILIKE ? THEN 1.2 ELSE 1 END' => $SQLstring } ];
+ $bonus{'metabib::identifier_field_entry'} =
+ $bonus{'metabib::keyword_field_entry'} = [
+ { 'CASE WHEN f.value ILIKE ? THEN 1.2 ELSE 1 END' => $SQLstring }
+ ];
+
$bonus{'metabib::title_field_entry'} =
$bonus{'metabib::series_field_entry'} = [
{ 'CASE WHEN f.value ILIKE ? THEN 1.5 ELSE 1 END' => $first_word },
return undef;
}
-for my $class ( qw/title author subject keyword series/ ) {
+for my $class ( qw/title author subject keyword series identifier/ ) {
__PACKAGE__->register_method(
api_name => "open-ils.storage.metabib.$class.post_filter.search_fts.metarecord",
method => 'postfilter_search_class_fts',
subject => "metabib::subject_field_entry",
keyword => "metabib::keyword_field_entry",
series => "metabib::series_field_entry",
+ identifier => "metabib::identifier_field_entry",
};
# XXX factored most of the PG dependant stuff out of here... need to find a way to do "dependants".
CREATE INDEX metabib_metarecord_master_record_idx ON metabib.metarecord (master_record);
CREATE INDEX metabib_metarecord_fingerprint_idx ON metabib.metarecord (fingerprint);
+CREATE TABLE metabib.identifier_field_entry (
+ id BIGSERIAL PRIMARY KEY,
+ source BIGINT NOT NULL,
+ field INT NOT NULL,
+ value TEXT NOT NULL,
+ index_vector tsvector NOT NULL
+);
+CREATE TRIGGER metabib_identifier_field_entry_fti_trigger
+ BEFORE UPDATE OR INSERT ON metabib.identifier_field_entry
+ FOR EACH ROW EXECUTE PROCEDURE oils_tsearch2('keyword');
+
+CREATE INDEX metabib_identifier_field_entry_index_vector_idx ON metabib.identifier_field_entry USING GIST (index_vector);
+CREATE INDEX metabib_identifier_field_entry_value_idx ON metabib.identifier_field_entry (SUBSTRING(value,1,1024)) WHERE index_vector = ''::TSVECTOR;
+CREATE INDEX metabib_identifier_field_entry_source_idx ON metabib.identifier_field_entry (source);
+
+
CREATE TABLE metabib.title_field_entry (
id BIGSERIAL PRIMARY KEY,
source BIGINT NOT NULL,
ALTER TABLE metabib.title_field_entry ADD CONSTRAINT metabib_title_field_entry_source_pkey FOREIGN KEY (source) REFERENCES biblio.record_entry (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE metabib.title_field_entry ADD CONSTRAINT metabib_title_field_entry_field_pkey FOREIGN KEY (field) REFERENCES config.metabib_field (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE metabib.identifier_field_entry ADD CONSTRAINT metabib_identifier_field_entry_source_pkey FOREIGN KEY (source) REFERENCES biblio.record_entry (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE metabib.identifier_field_entry ADD CONSTRAINT metabib_identifier_field_entry_field_pkey FOREIGN KEY (field) REFERENCES config.metabib_field (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
+
ALTER TABLE metabib.author_field_entry ADD CONSTRAINT metabib_author_field_entry_source_pkey FOREIGN KEY (source) REFERENCES biblio.record_entry (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE metabib.author_field_entry ADD CONSTRAINT metabib_author_field_entry_field_pkey FOREIGN KEY (field) REFERENCES config.metabib_field (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE metabib.keyword_field_entry ADD CONSTRAINT metabib_keyword_field_entry_source_pkey FOREIGN KEY (source) REFERENCES biblio.record_entry (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE metabib.keyword_field_entry ADD CONSTRAINT metabib_keyword_field_entry_field_pkey FOREIGN KEY (field) REFERENCES config.metabib_field (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE metabib.series_field_entry ADD CONSTRAINT metabib_series_field_entry_source_pkey FOREIGN KEY (source) REFERENCES biblio.record_entry (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE metabib.series_field_entry ADD CONSTRAINT metabib_series_field_entry_field_pkey FOREIGN KEY (field) REFERENCES config.metabib_field (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
+
ALTER TABLE metabib.rec_descriptor ADD CONSTRAINT metabib_rec_descriptor_record_fkey FOREIGN KEY (record) REFERENCES biblio.record_entry (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE metabib.real_full_rec ADD CONSTRAINT metabib_full_rec_record_fkey FOREIGN KEY (record) REFERENCES biblio.record_entry (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
INSERT INTO config.standing (id, value) VALUES (2, oils_i18n_gettext(2, 'Barred', 'cst', 'value'));
SELECT SETVAL('config.standing_id_seq'::TEXT, 100);
+INSERT INTO config.metabib_class ( name, label ) VALUES ( 'identifier', oils_i18n_gettext('identifier', 'Identifier', 'cmc', 'name') );
INSERT INTO config.metabib_class ( name, label ) VALUES ( 'keyword', oils_i18n_gettext('keyword', 'Keyword', 'cmc', 'name') );
INSERT INTO config.metabib_class ( name, label ) VALUES ( 'title', oils_i18n_gettext('title', 'Title', 'cmc', 'name') );
INSERT INTO config.metabib_class ( name, label ) VALUES ( 'author', oils_i18n_gettext('author', 'Author', 'cmc', 'name') );
(15, 'keyword', 'keyword', oils_i18n_gettext(15, 'General Keywords', 'cmf', 'label'), 'mods32', $$//mods32:mods/*[not(local-name()='originInfo')]$$ ); -- /* to fool vim */;
INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath ) VALUES
(16, 'subject', 'complete', oils_i18n_gettext(16, 'All Subjects', 'cmf', 'label'), 'mods32', $$//mods32:mods/mods32:subject//text()$$ );
+
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (17, 'identifier', 'accession', oils_i18n_gettext(17, 'Accession Number', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="001"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (18, 'identifier', 'isbn', oils_i18n_gettext(18, 'ISBN', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="020"]/marcxml:subfield[code="a" or code="z"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (19, 'identifier', 'issn', oils_i18n_gettext(19, 'ISSN', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="022"]/marcxml:subfield[code="a" or code="z"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (20, 'identifier', 'upc', oils_i18n_gettext(20, 'UPC', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="024" and ind1="1"]/marcxml:subfield[code="a" or code="z"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (21, 'identifier', 'ismn', oils_i18n_gettext(21, 'ISMN', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="024" and ind1="2"]/marcxml:subfield[code="a" or code="z"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (22, 'identifier', 'ean', oils_i18n_gettext(22, 'EAN', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="024" and ind1="3"]/marcxml:subfield[code="a" or code="z"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (23, 'identifier', 'isrc', oils_i18n_gettext(23, 'ISRC', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="024" and ind1="0"]/marcxml:subfield[code="a" or code="z"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (24, 'identifier', 'sici', oils_i18n_gettext(24, 'SICI', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="024" and ind1="4"]/marcxml:subfield[code="a" or code="z"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (25, 'identifier', 'bibcn', oils_i18n_gettext(25, 'Local Free-Text Call Number', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="099"]//text()$$, TRUE );
+
SELECT SETVAL('config.metabib_field_id_seq'::TEXT, (SELECT MAX(id) FROM config.metabib_field), TRUE);
INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('kw','keyword');
INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('eg.keyword','keyword');
INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('dc.publisher','keyword');
-INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('dc.identifier','keyword');
INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('bib.subjecttitle','keyword');
INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('bib.genre','keyword');
INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('bib.edition','keyword');
INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('srw.serverchoice','keyword');
+INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('id','identifier');
+INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('dc.identifier','identifier');
+INSERT INTO config.metabib_search_alias (alias,field_class,field) VALUES ('eg.isbn','identifier', 18);
+INSERT INTO config.metabib_search_alias (alias,field_class,field) VALUES ('eg.issn','identifier', 19);
+INSERT INTO config.metabib_search_alias (alias,field_class,field) VALUES ('eg.upc','identifier', 20);
+INSERT INTO config.metabib_search_alias (alias,field_class,field) VALUES ('eg.callnumber','identifier', 25);
+
INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('au','author');
INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('name','author');
INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('creator','author');
--- /dev/null
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0265'); -- miker
+
+ALTER TABLE config.metabib_field DROP CONSTRAINT metabib_field_field_class_check;
+
+INSERT INTO config.metabib_class ( name, label ) VALUES ( 'identifier', oils_i18n_gettext('identifier', 'Identifier', 'cmc', 'name') );
+
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (17, 'identifier', 'accession', oils_i18n_gettext(17, 'Accession Number', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="001"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (18, 'identifier', 'isbn', oils_i18n_gettext(18, 'ISBN', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="020"]/marcxml:subfield[code="a" or code="z"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (19, 'identifier', 'issn', oils_i18n_gettext(19, 'ISSN', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="022"]/marcxml:subfield[code="a" or code="z"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (20, 'identifier', 'upc', oils_i18n_gettext(20, 'UPC', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="024" and ind1="1"]/marcxml:subfield[code="a" or code="z"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (21, 'identifier', 'ismn', oils_i18n_gettext(21, 'ISMN', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="024" and ind1="2"]/marcxml:subfield[code="a" or code="z"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (22, 'identifier', 'ean', oils_i18n_gettext(22, 'EAN', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="024" and ind1="3"]/marcxml:subfield[code="a" or code="z"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (23, 'identifier', 'isrc', oils_i18n_gettext(23, 'ISRC', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="024" and ind1="0"]/marcxml:subfield[code="a" or code="z"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (24, 'identifier', 'sici', oils_i18n_gettext(24, 'SICI', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="024" and ind1="4"]/marcxml:subfield[code="a" or code="z"]/text()$$, TRUE );
+INSERT INTO config.metabib_field ( id, field_class, name, label, format, xpath, facet_field ) VALUES
+ (25, 'identifier', 'bibcn', oils_i18n_gettext(25, 'Local Free-Text Call Number', 'cmf', 'label'), 'marcxml', $$//marcxml:datafield[tag="099"]//text()$$, TRUE );
+
+SELECT SETVAL('config.metabib_field_id_seq'::TEXT, (SELECT MAX(id) FROM config.metabib_field), TRUE);
+
+
+DELETE FROM config.metabib_search_alias WHERE alias = 'dc.identifier';
+
+INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('id','identifier');
+INSERT INTO config.metabib_search_alias (alias,field_class) VALUES ('dc.identifier','identifier');
+INSERT INTO config.metabib_search_alias (alias,field_class,field) VALUES ('eg.isbn','identifier', 18);
+INSERT INTO config.metabib_search_alias (alias,field_class,field) VALUES ('eg.issn','identifier', 19);
+INSERT INTO config.metabib_search_alias (alias,field_class,field) VALUES ('eg.upc','identifier', 20);
+INSERT INTO config.metabib_search_alias (alias,field_class,field) VALUES ('eg.callnumber','identifier', 25);
+
+CREATE TABLE metabib.identifier_field_entry (
+ id BIGSERIAL PRIMARY KEY,
+ source BIGINT NOT NULL,
+ field INT NOT NULL,
+ value TEXT NOT NULL,
+ index_vector tsvector NOT NULL
+);
+CREATE TRIGGER metabib_identifier_field_entry_fti_trigger
+ BEFORE UPDATE OR INSERT ON metabib.identifier_field_entry
+ FOR EACH ROW EXECUTE PROCEDURE oils_tsearch2('keyword');
+
+CREATE INDEX metabib_identifier_field_entry_index_vector_idx ON metabib.identifier_field_entry USING GIST (index_vector);
+CREATE INDEX metabib_identifier_field_entry_value_idx ON metabib.identifier_field_entry
+ (SUBSTRING(value,1,1024)) WHERE index_vector = ''::TSVECTOR;
+CREATE INDEX metabib_identifier_field_entry_source_idx ON metabib.identifier_field_entry (source);
+
+ALTER TABLE metabib.identifier_field_entry ADD CONSTRAINT metabib_identifier_field_entry_source_pkey
+ FOREIGN KEY (source) REFERENCES biblio.record_entry (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
+ALTER TABLE metabib.identifier_field_entry ADD CONSTRAINT metabib_identifier_field_entry_field_pkey
+ FOREIGN KEY (field) REFERENCES config.metabib_field (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
+
+COMMIT;
+