-
Notifications
You must be signed in to change notification settings - Fork 2
/
schema.sql
41 lines (37 loc) · 882 Bytes
/
schema.sql
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
33
34
35
36
37
38
39
40
41
create table if not exists sync_states(
post_id integer primary key,
last_comment_id integer,
pending boolean,
priority integer,
synced timestamp,
result varchar
);
create table if not exists users(
user_id integer primary key,
name varchar,
avatar_hash varchar
);
create table if not exists posts(
post_id integer primary key,
comment_list_id integer,
user_id integer,
language varchar,
code varchar,
text varchar,
posted timestamp,
vote_plus integer,
vote_minus integer,
rating numeric
);
create table if not exists comments(
comment_id integer primary key,
post_id integer,
parent_id integer,
user_id integer,
text varchar,
posted timestamp,
vote_plus integer,
vote_minus integer,
rating numeric
);
create index if not exists comments_posted on comments(posted);