From: dbs Date: Wed, 26 May 2010 01:35:37 +0000 (+0000) Subject: Add actor.usr_password_reset table required for password reset functionality - missed... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8e397e9a4b998ce6b7aacd2d7f8e681120afa3b1;p=evergreen%2Fbjwebb.git Add actor.usr_password_reset table required for password reset functionality - missed it in 0237. git-svn-id: svn://svn.open-ils.org/ILS/trunk@16503 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 0b38ed82b..c9f1029ea 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -65,7 +65,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0275'); -- miker +INSERT INTO config.upgrade_log (version) VALUES ('0276'); -- dbs CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/upgrade/0276.schema.actor_usr_password_reset.sql b/Open-ILS/src/sql/Pg/upgrade/0276.schema.actor_usr_password_reset.sql new file mode 100644 index 000000000..c6fbdfc30 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0276.schema.actor_usr_password_reset.sql @@ -0,0 +1,40 @@ +BEGIN; + +-- action_trigger values were inserted in 0237, but we forgot about the +-- core table. Oops. + +INSERT INTO config.upgrade_log (version) VALUES ('0276'); -- dbs + +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(), + has_been_reset BOOL NOT NULL DEFAULT false +); +COMMENT ON TABLE actor.usr_password_reset IS $$ +/* + * Copyright (C) 2010 Laurentian University + * Dan Scott + * + * Self-serve password reset requests + * + * **** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +$$; +CREATE UNIQUE INDEX actor_usr_password_reset_uuid_idx ON actor.usr_password_reset (uuid); +CREATE INDEX actor_usr_password_reset_usr_idx ON actor.usr_password_reset (usr); +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); + +COMMIT;