[open-ils-commits] r18625 - tags/rel_1_6_1_3/Open-ILS/src/sql/Pg (gmc)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Nov 5 13:04:41 EDT 2010


Author: gmc
Date: 2010-11-05 13:04:38 -0400 (Fri, 05 Nov 2010)
New Revision: 18625

Modified:
   tags/rel_1_6_1_3/Open-ILS/src/sql/Pg/005.schema.actors.sql
   tags/rel_1_6_1_3/Open-ILS/src/sql/Pg/1.6.1.2-1.6.1.3-upgrade-db.sql
Log:
fix user password reset request time column def

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 at esilibrary.com>


Modified: tags/rel_1_6_1_3/Open-ILS/src/sql/Pg/005.schema.actors.sql
===================================================================
--- tags/rel_1_6_1_3/Open-ILS/src/sql/Pg/005.schema.actors.sql	2010-11-05 17:03:24 UTC (rev 18624)
+++ tags/rel_1_6_1_3/Open-ILS/src/sql/Pg/005.schema.actors.sql	2010-11-05 17:04:38 UTC (rev 18625)
@@ -528,7 +528,7 @@
   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 $$

Modified: tags/rel_1_6_1_3/Open-ILS/src/sql/Pg/1.6.1.2-1.6.1.3-upgrade-db.sql
===================================================================
--- tags/rel_1_6_1_3/Open-ILS/src/sql/Pg/1.6.1.2-1.6.1.3-upgrade-db.sql	2010-11-05 17:03:24 UTC (rev 18624)
+++ tags/rel_1_6_1_3/Open-ILS/src/sql/Pg/1.6.1.2-1.6.1.3-upgrade-db.sql	2010-11-05 17:04:38 UTC (rev 18625)
@@ -180,5 +180,7 @@
     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;
 



More information about the open-ils-commits mailing list