</actions>
</permacrud>
</class>
- <class id="sfr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::full_rec" oils_persist:tablename="serial.full_rec" reporter:label="Serial Full Record">
- <fields oils_persist:primary="id" oils_persist:sequence="serial.full_rec_id_seq">
- <field name="id" reporter:datatype="id" />
- <field name="ind1" />
- <field name="ind2" />
- <field name="record" />
- <field name="subfield" />
- <field name="tag" />
- <field name="value" />
- </fields>
- <links>
- <link field="record" reltype="has_a" key="id" map="" class="sre"/>
- </links>
- </class>
<class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
<fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
<field name="active" reporter:datatype="bool"/>
CREATE INDEX serial_record_entry_editor_idx ON serial.record_entry ( editor );
CREATE INDEX serial_record_entry_owning_lib_idx ON serial.record_entry ( owning_lib, deleted );
-CREATE TABLE serial.full_rec (
- id BIGSERIAL PRIMARY KEY,
- record BIGINT NOT NULL REFERENCES serial.record_entry(id) DEFERRABLE INITIALLY DEFERRED,
- tag CHAR(3) NOT NULL,
- ind1 TEXT,
- ind2 TEXT,
- subfield TEXT,
- value TEXT NOT NULL,
- index_vector tsvector NOT NULL
-);
-CREATE INDEX serial_full_rec_record_idx ON serial.full_rec (record);
-CREATE INDEX serial_full_rec_tag_part_idx ON serial.full_rec (SUBSTRING(tag FROM 2));
-CREATE TRIGGER serial_full_rec_fti_trigger
- BEFORE UPDATE OR INSERT ON serial.full_rec
- FOR EACH ROW EXECUTE PROCEDURE tsearch2(index_vector, value);
-
-CREATE INDEX serial_full_rec_index_vector_idx ON serial.full_rec USING GIST (index_vector);
-/* Enable LIKE to use an index for database clusters with locales other than C or POSIX */
-CREATE INDEX serial_full_rec_value_tpo_index ON serial.full_rec (value text_pattern_ops);
-
CREATE TABLE serial.subscription (
id SERIAL PRIMARY KEY,
callnumber BIGINT REFERENCES asset.call_number (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
- PERL5LIB=/openils/lib/perl5/ perl ../../src/extras/import/marc2bre.pl --marctype XML --start 1 --idfield 901 --idsubfield a serials_marc21.xml | perl ../../src/extras/import/direct_ingest.pl | perl ../../src/extras/import/pg_loader.pl -or bre -or mrd -or mfr -or mtfe -or mafe -or msfe -or mkfe -or msefe -a mrd -a mfr -a mtfe -a mafe -a msfe -a mkfe -a msefe | psql -U evergreen -h localhost
- Then load the MFHD records
- - PERL5LIB=/openils/lib/perl5/ perl ../../src/extras/import/marc2sre.pl --marctype XML --password demo123 serials_mfhd.xml | perl ../../src/extras/import/direct_ingest.pl --serial | perl ../../src/extras/import/pg_loader.pl -or sre -or sfr -a sfr > mfhd21.sql
+ - PERL5LIB=/openils/lib/perl5/ perl ../../src/extras/import/marc2sre.pl --marctype XML --password demo123 serials_mfhd.xml | perl ../../src/extras/import/direct_ingest.pl --serial | perl ../../src/extras/import/pg_loader.pl -or sre > mfhd21.sql
- psql -f mfhd21.sql