From: Jason Stephenson Date: Mon, 2 Jun 2014 23:57:15 +0000 (-0400) Subject: LP 1198475: Add LOSTANDPAID as valid stop_fines. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fkmlussier%2Flp1198475_Lost_and_Paid_Status;p=working%2FEvergreen.git LP 1198475: Add LOSTANDPAID as valid stop_fines. Alter the check constraint on action.circulation.stop_fines, circulation_stop_fines_check, to allow 'LOSTANDPAID' as a valid value. Signed-off-by: Jason Stephenson Signed-off-by: Kathy Lussier --- diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql index ad78f50e86..5a7832cfaa 100644 --- a/Open-ILS/src/sql/Pg/090.schema.action.sql +++ b/Open-ILS/src/sql/Pg/090.schema.action.sql @@ -139,7 +139,7 @@ CREATE TABLE action.circulation ( recurring_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','CLAIMSNEVERCHECKEDOUT')), + 'CHECKIN','CLAIMSRETURNED','LOST','MAXFINES','RENEW','LONGOVERDUE','CLAIMSNEVERCHECKEDOUT','LOSTANDPAID')), workstation INT REFERENCES actor.workstation(id) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED, diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lost-and-paid-status.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lost-and-paid-status.sql new file mode 100644 index 0000000000..e22feac7aa --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.lost-and-paid-status.sql @@ -0,0 +1,6 @@ +ALTER TABLE action.circulation + DROP CONSTRAINT circulation_stop_fines_check; + +ALTER TABLE action.circulation + ADD CONSTRAINT circulation_stop_fines_check + CHECK (stop_fines = ANY (ARRAY['CHECKIN'::text, 'CLAIMSRETURNED'::text, 'LOST'::text, 'MAXFINES'::text, 'RENEW'::text, 'LONGOVERDUE'::text, 'CLAIMSNEVERCHECKEDOUT'::text, 'LOSTANDPAID'::text]));