summaryrefslogtreecommitdiff
path: root/SCHEMA.sql
diff options
context:
space:
mode:
authorOlli Vilén <oviln@local>2023-11-16 22:11:46 +0200
committerOlli Vilén <oviln@local>2023-11-16 22:11:46 +0200
commit0ed244ef2dd27a835ec12fdbc93a1f20bbcd89eb (patch)
treeba673352e44f2e1e55b8dc762b45a9cd769376e3 /SCHEMA.sql
parent93a927b130ba09cea29aba2077848f785ac48844 (diff)
More db actions and forms.
Diffstat (limited to 'SCHEMA.sql')
-rw-r--r--SCHEMA.sql21
1 files changed, 21 insertions, 0 deletions
diff --git a/SCHEMA.sql b/SCHEMA.sql
index 1c5c372..6832923 100644
--- a/SCHEMA.sql
+++ b/SCHEMA.sql
@@ -3,3 +3,24 @@ CREATE TABLE users (
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
+);