Skip to content
Snippets Groups Projects

Registrace

Merged Martin Mareš requested to merge mj/registrace into devel
3 files
+ 63
0
Compare changes
  • Side-by-side
  • Inline

Files

+ 21
0
@@ -322,3 +322,24 @@ CREATE TABLE messages (
markdown text NOT NULL,
html text NOT NULL
);
-- Požadavky na registraci a změny vlastností účtu
CREATE TYPE reg_req_type AS ENUM (
'register',
'change',
'reset'
);
CREATE TABLE reg_requests (
reg_id serial PRIMARY KEY,
type reg_req_type NOT NULL,
created_at timestamp with time zone NOT NULL,
expires_at timestamp with time zone NOT NULL,
used_at timestamp with time zone DEFAULT NULL,
email varchar(255) DEFAULT NULL, -- adresa, kterou potvrzujeme
captcha_token varchar(255) DEFAULT NULL, -- token pro fázi 1 registrace
email_token varchar(255) UNIQUE NOT NULL, -- token pro fázi 2 registrace
user_id int DEFAULT NULL REFERENCES users(user_id) ON DELETE CASCADE,
client varchar(255) NOT NULL -- kdo si registraci vyžádal
);
Loading