Mercurial > gemma
changeset 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 | 974a5e4c0055 |
files | schema/auth.sql schema/gemma.sql |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/schema/auth.sql Thu Aug 02 13:06:39 2018 +0200 +++ b/schema/auth.sql Thu Aug 02 15:14:38 2018 +0200 @@ -37,6 +37,7 @@ GRANT USAGE ON SCHEMA pw_reset TO pw_reset; GRANT SELECT (username, email_address) ON pw_reset.list_users TO pw_reset; GRANT UPDATE (pw) ON pw_reset.list_users TO pw_reset; +GRANT INSERT, SELECT, DELETE ON pw_reset.password_reset_requests TO pw_reset; --
--- 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