summaryrefslogtreecommitdiff
path: root/SCHEMA.sql
blob: 6832923a88163faa02ad0eae441d99f6bdc8aefd (plain)
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
CREATE TABLE users (
	id SERIAL PRIMARY KEY,
	nick TEXT,
	created INT
);
CREATE TABLE questions (
	id SERIAL PRIMARY KEY,
	question TEXT,
	neg_answer TEXT,
	pos_answer TEXT,
	created INT
);
CREATE TABLE answers (
	id SERIAL PRIMARY KEY,
	user_id INT,
	question_id INT,
	answer INT,
	created INT
);
CREATE TABLE questionaires (
	id SERIAL PRIMARY KEY,
	questionset INT[] DEFAULT '{}',
	creator_id INT,
	ready BOOLEAN DEFAULT FALSE,
	created INT
);