fix user password reset request time column def
authorgmc <gmc@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 5 Nov 2010 17:02:59 +0000 (17:02 +0000)
committergmc <gmc@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 5 Nov 2010 17:02:59 +0000 (17:02 +0000)
Needs to be a timestamp with time zone; fixes a bug
where it was interpreted as a UTC time, throwing off
the calculation of the expiration of the password reset
request.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6_1@18623 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/005.schema.actors.sql
Open-ILS/src/sql/Pg/1.6.1.2-1.6.1.3-upgrade-db.sql

index b029de7..039bf00 100644 (file)
@@ -528,7 +528,7 @@ CREATE TABLE actor.usr_password_reset (
   id SERIAL PRIMARY KEY,
   uuid TEXT NOT NULL, 
   usr BIGINT NOT NULL REFERENCES actor.usr(id) DEFERRABLE INITIALLY DEFERRED, 
-  request_time TIMESTAMP NOT NULL DEFAULT NOW(), 
+  request_time TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), 
   has_been_reset BOOL NOT NULL DEFAULT false
 );
 COMMENT ON TABLE actor.usr_password_reset IS $$
index 2500201..c9f23ac 100644 (file)
@@ -180,5 +180,7 @@ CREATE OR REPLACE FUNCTION action.hold_retarget_permit_test( pickup_ou INT, requ
     SELECT * FROM action.hold_request_permit_test( $1, $2, $3, $4, $5, TRUE );
 $func$ LANGUAGE SQL;
 
+ALTER TABLE actor.usr_password_reset ALTER COLUMN request_time TYPE TIMESTAMP WITH TIME ZONE;
+
 COMMIT;