-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcomment.sql
More file actions
27 lines (27 loc) · 1.78 KB
/
comment.sql
File metadata and controls
27 lines (27 loc) · 1.78 KB
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
-- https://kimsereylam.com/sqlite/2020/03/06/full-text-search-with-sqlite.html
-- decoded_reddit_id is the decoded base36 reddit_id. We use it as our primary key for performance reasons. See more in https://www.sqlite.org/lang_createtable.html#rowid
CREATE TABLE IF NOT EXISTS comment (decoded_reddit_id INTEGER PRIMARY KEY,
reddit_id TEXT NOT NULL,
permalink TEXT,
author TEXT,
author_premium BOOLEAN,
subreddit TEXT NOT NULL,
subreddit_type TEXT,
decoded_subreddit_id INTEGER NOT NULL,
body TEXT,
score INTEGER,
ups INTEGER,
downs INTEGER,
created_utc INTEGER NOT NULL,
retrieved_on INTEGER,
edited_utc INTEGER,
parent_type INTEGER,
parent_id TEXT,
decoded_parent_id INTEGER,
stickied BOOLEAN NOT NULL DEFAULT FALSE,
parent_is_post BOOLEAN NOT NULL DEFAULT FALSE,
is_submitter BOOLEAN NOT NULL DEFAULT FALSE,
archived BOOLEAN NOT NULL DEFAULT FALSE,
locked BOOLEAN NOT NULL DEFAULT FALSE,
collapsed BOOLEAN NOT NULL DEFAULT FALSE,
distinguished TEXT);