From 9c67b46f027ac9802a3349e00e2e3c5d37a91457 Mon Sep 17 00:00:00 2001 From: Maciej Ziarkowski Date: Wed, 21 Aug 2019 14:20:53 +0100 Subject: [PATCH] Add password reset token database migrations --- migrations/010.password-reset.down.sql | 1 + migrations/010.password-reset.up.sql | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 migrations/010.password-reset.down.sql create mode 100644 migrations/010.password-reset.up.sql diff --git a/migrations/010.password-reset.down.sql b/migrations/010.password-reset.down.sql new file mode 100644 index 00000000..680cc4f3 --- /dev/null +++ b/migrations/010.password-reset.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS user_password_reset_tokens; \ No newline at end of file diff --git a/migrations/010.password-reset.up.sql b/migrations/010.password-reset.up.sql new file mode 100644 index 00000000..3635975c --- /dev/null +++ b/migrations/010.password-reset.up.sql @@ -0,0 +1,6 @@ +CREATE TABLE IF NOT EXISTS user_password_reset_tokens ( + token uuid PRIMARY KEY DEFAULT gen_random_uuid(), + user_id uuid, + expires_on timestamp NOT NULL, + used boolean NOT NULL DEFAULT false +) \ No newline at end of file