<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 reporter:label="Id" name="id" reporter:datatype="id"/>
+ <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
<field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
<field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
<field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
<field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
</fields>
<links>
+ <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
<link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
</links>
</class>
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0312'); -- atz
+INSERT INTO config.upgrade_log (version) VALUES ('0313'); -- miker
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
CREATE TABLE serial.subscription (
id SERIAL PRIMARY KEY,
+ owning_lib INT NOT NULL DEFAULT 1 REFERENCES actor.org_unit (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED,
start_date TIMESTAMP WITH TIME ZONE NOT NULL,
end_date TIMESTAMP WITH TIME ZONE, -- interpret NULL as current subscription
record_entry BIGINT REFERENCES biblio.record_entry (id)
--- /dev/null
+BEGIN;
+
+-- Org Unit Settings for configuring org unit weights and org unit max-loops for hold targeting
+
+INSERT INTO config.upgrade_log (version) VALUES ('0313'); --miker
+
+ALTER TABLE serial.subscription ADD COLUMN owning_lib INT NOT NULL DEFAULT 1 REFERENCES actor.org_unit (id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED;
+
+COMMIT;
+