[open-ils-commits] r16503 - in trunk/Open-ILS/src/sql/Pg: . upgrade (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue May 25 21:35:38 EDT 2010


Author: dbs
Date: 2010-05-25 21:35:37 -0400 (Tue, 25 May 2010)
New Revision: 16503

Added:
   trunk/Open-ILS/src/sql/Pg/upgrade/0276.schema.actor_usr_password_reset.sql
Modified:
   trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
Log:
Add actor.usr_password_reset table required for password reset functionality - missed it in 0237.


Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql	2010-05-26 01:30:48 UTC (rev 16502)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql	2010-05-26 01:35:37 UTC (rev 16503)
@@ -65,7 +65,7 @@
     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,

Added: trunk/Open-ILS/src/sql/Pg/upgrade/0276.schema.actor_usr_password_reset.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0276.schema.actor_usr_password_reset.sql	                        (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0276.schema.actor_usr_password_reset.sql	2010-05-26 01:35:37 UTC (rev 16503)
@@ -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 <dscott at laurentian.ca>
+ *
+ * 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;



More information about the open-ils-commits mailing list