url_verify schema repair / res-code constraint
authorBill Erickson <berick@esilibrary.com>
Thu, 9 Aug 2012 15:34:14 +0000 (11:34 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 9 Aug 2012 15:34:14 +0000 (11:34 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/sql/Pg/075.schema.url_verify.sql

index fd365e0..a87acd8 100644 (file)
@@ -83,7 +83,7 @@ CREATE TABLE url_verify.url_verification (
     attempt     INT                         NOT NULL REFERENCES url_verify.verification_attempt (id) DEFERRABLE INITIALLY DEFERRED,
     req_time    TIMESTAMP WITH TIME ZONE    NOT NULL DEFAULT NOW(),
     res_time    TIMESTAMP WITH TIME ZONE, 
-    res_code    INT                         CHECK (res_code BETWEEN 100 AND 599),
+    res_code    INT                         CHECK (res_code BETWEEN 100 AND 999), -- we know > 599 will never be valid HTTP code, but we use 9XX for other stuff
     res_text    TEXT, 
     redirect_to INT                         REFERENCES url_verify.url (id) DEFERRABLE INITIALLY DEFERRED -- if redirected
 );