diff schema/gemma.sql @ 320:e4bf72cda62e

Added new table password_reset_requests to schema pw_reset.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 02 Aug 2018 15:14:38 +0200
parents ac760b0f22a9
children c6b32c6ae95e
line wrap: on
line diff
--- a/schema/gemma.sql	Thu Aug 02 13:06:39 2018 +0200
+++ b/schema/gemma.sql	Thu Aug 02 15:14:38 2018 +0200
@@ -166,7 +166,15 @@
 
 
 -- Namespace intended to be the only one that pw_reset can access
-CREATE SCHEMA pw_reset;
+CREATE SCHEMA pw_reset
+    CREATE TABLE password_reset_requests (
+        hash varchar(32) PRIMARY KEY,
+        issued timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+        username varchar NOT NULL
+            REFERENCES internal.user_profiles(username)
+                ON DELETE CASCADE
+    )
+;
 
 
 -- Namespace for waterway data that can change in a running system