-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathschema.sql
More file actions
32 lines (32 loc) · 776 Bytes
/
schema.sql
File metadata and controls
32 lines (32 loc) · 776 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 threads (
tid INT PRIMARY KEY,
forum_id INT NOT NULL,
topic TEXT
);
CREATE TABLE posts (
pid INT PRIMARY KEY,
topic INT NOT NULL,
seq INT NOT NULL,
author TEXT NOT NULL,
utime INTEGER NOT NULL,
edit_count INT DEFAULT 0,
edit_user TEXT,
edit_time INT,
post_title TEXT,
content TEXT,
signature TEXT
);
CREATE TABLE users (
username TEXT PRIMARY KEY,
join_date INT NOT NULL,
post_count INT NOT NULL,
rank TEXT
);
CREATE TABLE bogusthreads (
tid INT PRIMARY KEY
);
CREATE TABLE unauthorized (
tid INT PRIMARY KEY
);
-- Tapatalk calls anon users 'Guest', and we don't want to look for their info so as to avoid script dying in a fire lol
INSERT INTO users VALUES ('Guest', 0, 0, 'undef');