If auditor.action_hold_request_history exists, add columns
mint_condition and shelf_expire_time.
M Open-ILS/src/sql/Pg/090.schema.action.sql
M Open-ILS/src/sql/Pg/002.schema.config.sql
A Open-ILS/src/sql/Pg/upgrade/0070.schema.ahr-shelf-expire-time.sql
M Open-ILS/examples/fm_IDL.xml
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14751
dcc99617-32d9-48b4-a31d-
7c20da2025e4
<field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
<field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
<field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
+ <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
<field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
</fields>
<links>
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0069'); -- Scott McKellar
+INSERT INTO config.upgrade_log (version) VALUES ('0070'); -- Scott McKellar
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
thaw_date TIMESTAMP WITH TIME ZONE,
shelf_time TIMESTAMP WITH TIME ZONE,
cut_in_line BOOL,
- mint_condition BOOL NOT NULL DEFAULT TRUE
+ mint_condition BOOL NOT NULL DEFAULT TRUE,
+ shelf_expire_time TIMESTAMPTZ
);
CREATE INDEX hold_request_target_idx ON action.hold_request (target);
--- /dev/null
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0070');
+
+ALTER TABLE action.hold_request
+ADD COLUMN shelf_expire_time TIMESTAMPTZ;
+
+COMMIT;
+
+-- If the following ALTERs die because the table doesn't exist, don't
+-- worry about it. Some installations have it and some don't.
+
+ALTER TABLE auditor.action_hold_request_history
+ADD COLUMN mint_condition boolean NOT NULL DEFAULT TRUE;
+
+ALTER TABLE auditor.action_hold_request_history
+ADD COLUMN shelf_expire_time TIMESTAMPTZ;