-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb_init.sql
More file actions
18 lines (17 loc) · 783 Bytes
/
db_init.sql
File metadata and controls
18 lines (17 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
CREATE TABLE mentors( id INTEGER PRIMARY KEY
, name TEXT NOT NULL
, tickets_claimed INTEGER NOT NULL
, tickets_closed INTEGER NOT NULL
);
CREATE TABLE tickets( id INTEGER PRIMARY KEY
, message TEXT NOT NULL
, author_id INTEGER NOT NULL
, author TEXT NOT NULL
, author_location TEXT NOT NULL
, claimed BOOL NOT NULL
, closed BOOL NOT NULL
, mentor_assigned_id INTEGER
, mentor_assigned TEXT
, help_thread_id INTEGER
, FOREIGN KEY(mentor_assigned_id) REFERENCES mentors(mentor_id)
);