From eb90f44d06b2b1a3275a98aeeecb32df6a085548 Mon Sep 17 00:00:00 2001 From: gmc Date: Fri, 5 Nov 2010 16:45:45 +0000 Subject: [PATCH] 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 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 | 2 +- Open-ILS/src/sql/Pg/005.schema.actors.sql | 2 +- Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 2c4bc6879..6d6144117 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -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, diff --git a/Open-ILS/src/sql/Pg/005.schema.actors.sql b/Open-ILS/src/sql/Pg/005.schema.actors.sql index cba0ee6ea..a1ae60ce0 100644 --- a/Open-ILS/src/sql/Pg/005.schema.actors.sql +++ b/Open-ILS/src/sql/Pg/005.schema.actors.sql @@ -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 $$ diff --git a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql index d40cf9118..ede20f421 100644 --- a/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql +++ b/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql @@ -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 -- 2.11.0