From 0ed244ef2dd27a835ec12fdbc93a1f20bbcd89eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olli=20Vil=C3=A9n?= Date: Thu, 16 Nov 2023 22:11:46 +0200 Subject: More db actions and forms. --- SCHEMA.sql | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'SCHEMA.sql') 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 +); -- cgit v1.2.3