1CREATE TABLE questionnaires (
2    page TEXT NOT NULL PRIMARY KEY,
3    activated_on TIMESTAMP NOT NULL,
4    activated_by TEXT NOT NULL,
5    deactivated_on TIMESTAMP DEFAULT 0,
6    deactivated_by TEXT DEFAULT ''
7);
8
9CREATE TABLE answers (
10    page TEXT NOT NULL REFERENCES questionnaires(page),
11    question TEXT NOT NULL,
12    answer TEXT NOT NULL,
13    answered_on TIMESTAMP NOT NULL,
14    answered_by TEXT NOT NULL,
15    PRIMARY KEY (page, question, answer, answered_by)
16);
17