generated from CenterForCollectiveLearning/opencracia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tables.sql
33 lines (31 loc) · 865 Bytes
/
tables.sql
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
CREATE TABLE IF NOT EXISTS agree(
id SERIAL PRIMARY KEY,
user_id UUID NOT NULL,
ip_hash VARCHAR NOT NULL,
proposal_id INT NOT NULL,
agree INT NOT NULL,
universe INT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
score DECIMAL NOT NULL,
locale VARCHAR NOT NULL,
option VARCHAR
);
CREATE TABLE IF NOT EXISTS consent(
id SERIAL PRIMARY KEY,
user_id UUID NOT NULL,
ip_hash VARCHAR NOT NULL,
universe INT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
locale VARCHAR NOT NULL
);
CREATE TABLE IF NOT EXISTS rank(
id SERIAL PRIMARY KEY,
user_id UUID NOT NULL,
ip_hash VARCHAR NOT NULL,
rank VARCHAR NOT NULL,
updated INT NOT NULL,
universe INT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
score DECIMAL NOT NULL,
locale VARCHAR NOT NULL
);