[open-ils-commits] r14751 - in trunk/Open-ILS: examples src/sql/Pg src/sql/Pg/upgrade (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Nov 3 16:38:28 EST 2009
Author: scottmk
Date: 2009-11-03 16:38:22 -0500 (Tue, 03 Nov 2009)
New Revision: 14751
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0070.schema.ahr-shelf-expire-time.sql
Modified:
trunk/Open-ILS/examples/fm_IDL.xml
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/090.schema.action.sql
Log:
Add column shelf_expire_time to action.hold_request.
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
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2009-11-03 19:48:29 UTC (rev 14750)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2009-11-03 21:38:22 UTC (rev 14751)
@@ -2753,6 +2753,7 @@
<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>
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-11-03 19:48:29 UTC (rev 14750)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-11-03 21:38:22 UTC (rev 14751)
@@ -51,7 +51,7 @@
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,
Modified: trunk/Open-ILS/src/sql/Pg/090.schema.action.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/090.schema.action.sql 2009-11-03 19:48:29 UTC (rev 14750)
+++ trunk/Open-ILS/src/sql/Pg/090.schema.action.sql 2009-11-03 21:38:22 UTC (rev 14751)
@@ -355,7 +355,8 @@
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);
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0070.schema.ahr-shelf-expire-time.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0070.schema.ahr-shelf-expire-time.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0070.schema.ahr-shelf-expire-time.sql 2009-11-03 21:38:22 UTC (rev 14751)
@@ -0,0 +1,17 @@
+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;
More information about the open-ils-commits
mailing list