]> git.ipfire.org Git - pbs.git/blobdiff - src/database.sql
db: Add fields to store password recovery tokens
[pbs.git] / src / database.sql
index dd6d0b9d6600be6269652d0e8dc69c8c28dc7a95..f3df609d26b737aae55aad2174e28f0b156cd5c1 100644 (file)
@@ -1630,7 +1630,9 @@ CREATE TABLE users (
     activated boolean DEFAULT false NOT NULL,
     deleted boolean DEFAULT false NOT NULL,
     registered timestamp without time zone DEFAULT now() NOT NULL,
-    ldap_dn text
+    ldap_dn text,
+    password_recovery_code text,
+    password_recovery_code_expires_at timestamp without time zone
 );
 
 
@@ -2282,6 +2284,14 @@ ALTER TABLE ONLY sessions
     ADD CONSTRAINT sessions_session_id_key UNIQUE (session_id);
 
 
+--
+-- Name: users_password_recovery_code; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace: 
+--
+
+ALTER TABLE ONLY users
+    ADD CONSTRAINT users_password_recovery_code UNIQUE (password_recovery_code);
+
+
 --
 -- Name: arches_compat_native_arch; Type: INDEX; Schema: public; Owner: pakfire; Tablespace: 
 --