-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsql.txt
More file actions
executable file
·50 lines (45 loc) · 1.58 KB
/
sql.txt
File metadata and controls
executable file
·50 lines (45 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
CREATE TABLE public.accounts (
id SERIAL PRIMARY KEY,
email VARCHAR(255) NOT NULL,
first_name VARCHAR(255),
last_name VARCHAR(255),
username VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
country VARCHAR(255),
pin VARCHAR(4) NOT NULL,
registration_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
day INTEGER,
month INTEGER,
year INTEGER,
verified BOOLEAN DEFAULT false,
profile_picture VARCHAR(255) DEFAULT 'default_profile_image.png',
tfa VARCHAR(1) DEFAULT 'F',
auth_token VARCHAR(6),
ttmp TIMESTAMP,
role VARCHAR(10) DEFAULT 'user'
);
CREATE TABLE deleted_accounts (
id SERIAL PRIMARY KEY,
email VARCHAR(255) NOT NULL,
first_name VARCHAR(255) NOT NULL,
last_name VARCHAR(255) NOT NULL,
country VARCHAR(255) NOT NULL,
day INTEGER,
month INTEGER,
year INTEGER,
deleted_date DATE DEFAULT CURRENT_DATE,
deletion_reason TEXT
);
CREATE TABLE tokens (
id serial PRIMARY KEY,
account_id integer REFERENCES accounts(id) ON DELETE CASCADE,
username character varying(255) NOT NULL,
email character varying(255) NOT NULL,
verification_token character varying(255),
verification_sent_time timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
verification_token_expiration timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
reset_password_token character varying(255),
reset_password_token_expiration timestamp without time zone,
verification_token_new character varying(255)
);
if you are not familiar with the postgres database read here: https://www.postgresql.org/