fix user password reset request time column def
authorgmc <gmc@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 5 Nov 2010 16:45:45 +0000 (16:45 +0000)
committergmc <gmc@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 5 Nov 2010 16:45:45 +0000 (16:45 +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/trunk@18620 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/005.schema.actors.sql
Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql

index 2c4bc68..6d61441 100644 (file)
@@ -70,7 +70,7 @@ CREATE TABLE config.upgrade_log (
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0457'); -- senator
+INSERT INTO config.upgrade_log (version) VALUES ('0459'); -- gmc
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index cba0ee6..a1ae60c 100644 (file)
@@ -526,7 +526,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 d40cf91..ede20f4 100644 (file)
@@ -15545,7 +15545,7 @@ ALTER TABLE config.circ_modifier
 --  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 $$
@@ -15573,6 +15573,8 @@ ALTER TABLE config.circ_modifier
 --CREATE INDEX actor_usr_password_reset_request_time_idx ON actor.usr_password_reset (request_time);
 --CREATE INDEX actor_usr_password_reset_has_been_reset_idx ON actor.usr_password_reset (has_been_reset);
 
+ALTER TABLE actor.usr_password_reset ALTER COLUMN request_time TYPE TIMESTAMP WITH TIME ZONE;
+
 -- Use the identifier search class tsconfig
 DROP TRIGGER IF EXISTS metabib_identifier_field_entry_fti_trigger ON metabib.identifier_field_entry;
 CREATE TRIGGER metabib_identifier_field_entry_fti_trigger