-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb.sql
More file actions
32 lines (30 loc) · 813 Bytes
/
db.sql
File metadata and controls
32 lines (30 loc) · 813 Bytes
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
CREATE TABLE accounts (
email TEXT NOT NULL,
username TEXT NOT NULL,
password TEXT NOT NULL,
tokens TEXT,
sets TEXT,
notes TEXT
);
CREATE TABLE sets (
id BIGINT NOT NULL,
creator TEXT NOT NULL,
name TEXT NOT NULL,
description TEXT NOT NULL,
completions INTEGER, /* number of times the set has been completed */
case_sensitive BOOLEAN,
accent_sensitive BOOLEAN,
spanish BOOLEAN,
q_name TEXT, /* title of questions list (eg: states) */
q_items TEXT, /* questions (eg: NY) */
a_name TEXT, /* title of answers list (eg: capitals) */
a_items TEXT, /* answers (eg: Buffalo) */
cloned_from BIGINT /* id of the set this was cloned from */
);
CREATE TABLE notes (
id BIGINT NOT NULL,
creator TEXT NOT NULL,
title TEXT NOT NULL,
subject TEXT NOT NULL,
note TEXT NOT NULL
);