[open-ils-commits] r14538 - 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
Wed Oct 21 13:58:32 EDT 2009
Author: scottmk
Date: 2009-10-21 13:58:28 -0400 (Wed, 21 Oct 2009)
New Revision: 14538
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0043.schema.au-claims-never-checked-out-count.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/005.schema.actors.sql
trunk/Open-ILS/src/sql/Pg/090.schema.action.sql
Log:
1. Add column to actor.usr: claims_never_checked_out_count.
2. Add valid value 'CLAIMSNEVERCHECKEDOUT' to check constraint
for action.circulation.stop_fines.
M Open-ILS/src/sql/Pg/090.schema.action.sql
M Open-ILS/src/sql/Pg/005.schema.actors.sql
M Open-ILS/src/sql/Pg/002.schema.config.sql
A Open-ILS/src/sql/Pg/upgrade/0043.schema.au-claims-never-checked-out-count.sql
M Open-ILS/examples/fm_IDL.xml
Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml 2009-10-21 17:05:26 UTC (rev 14537)
+++ trunk/Open-ILS/examples/fm_IDL.xml 2009-10-21 17:58:28 UTC (rev 14538)
@@ -1650,6 +1650,7 @@
<field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
<field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
<field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
+ <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
<field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
<field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
<field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-10-21 17:05:26 UTC (rev 14537)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-10-21 17:58:28 UTC (rev 14538)
@@ -51,7 +51,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0042'); -- berick
+INSERT INTO config.upgrade_log (version) VALUES ('0043'); -- Scott McKellar
CREATE TABLE config.bib_source (
Modified: trunk/Open-ILS/src/sql/Pg/005.schema.actors.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/005.schema.actors.sql 2009-10-21 17:05:26 UTC (rev 14537)
+++ trunk/Open-ILS/src/sql/Pg/005.schema.actors.sql 2009-10-21 17:58:28 UTC (rev 14538)
@@ -64,7 +64,8 @@
last_xact_id TEXT NOT NULL DEFAULT 'none',
alert_message TEXT,
create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
- expire_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT (now() + '3 years'::INTERVAL)
+ expire_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT (now() + '3 years'::INTERVAL),
+ claims_never_checked_out_count INT NOT NULL DEFAULT 0
);
COMMENT ON TABLE actor.usr IS $$
/*
Modified: trunk/Open-ILS/src/sql/Pg/090.schema.action.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/090.schema.action.sql 2009-10-21 17:05:26 UTC (rev 14537)
+++ trunk/Open-ILS/src/sql/Pg/090.schema.action.sql 2009-10-21 17:58:28 UTC (rev 14538)
@@ -123,7 +123,8 @@
duration_rule TEXT NOT NULL, -- name of "circ duration" rule
recuring_fine_rule TEXT NOT NULL, -- name of "circ fine" rule
max_fine_rule TEXT NOT NULL, -- name of "max fine" rule
- stop_fines TEXT CHECK (stop_fines IN ('CHECKIN','CLAIMSRETURNED','LOST','MAXFINES','RENEW','LONGOVERDUE')),
+ stop_fines TEXT CHECK (stop_fines IN (
+ 'CHECKIN','CLAIMSRETURNED','LOST','MAXFINES','RENEW','LONGOVERDUE','CLAIMSNEVERCHECKEDOUT')),
workstation INT REFERENCES actor.workstation(id)
ON DELETE SET NULL
DEFERRABLE INITIALLY DEFERRED,
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0043.schema.au-claims-never-checked-out-count.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0043.schema.au-claims-never-checked-out-count.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0043.schema.au-claims-never-checked-out-count.sql 2009-10-21 17:58:28 UTC (rev 14538)
@@ -0,0 +1,16 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0043'); -- Scott McKellar
+
+ALTER TABLE actor.usr ADD COLUMN
+ claims_never_checked_out_count INT NOT NULL DEFAULT 0;
+
+ALTER TABLE action.circulation
+DROP CONSTRAINT circulation_stop_fines_check;
+
+ALTER TABLE action.circulation
+ ADD CONSTRAINT circulation_stop_fines_check
+ CHECK (stop_fines IN (
+ 'CHECKIN','CLAIMSRETURNED','LOST','MAXFINES','RENEW','LONGOVERDUE','CLAIMSNEVERCHECKEDOUT'));
+
+COMMIT;
More information about the open-ils-commits
mailing list