-
Notifications
You must be signed in to change notification settings - Fork 2
/
dbschema.json
109 lines (109 loc) · 4.28 KB
/
dbschema.json
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
"db_name": "KxoVid",
"db_file": "merged-KxoVid/KxoVid.db",
"version": 3,
"maps": {
"1HmJfQqTsfpdRinx3m8Kf1ZdoTzKcHfy2F/data/users/.+/data.json": {
"to_table": ["category_hubs", "channels", "channel_playlists"],
"to_keyvalue": ["subscriptions"]
},
".+/data/users/.+/content.json": {
"to_json_table": ["cert_user_id"],
"file_name": "data.json"
},
".+/data/users/.+/data.json": {
"to_table": ["videos", "comments", "moderated_comments"]
}
},
"tables": {
"json": {
"cols": [
["json_id", "INTEGER PRIMARY KEY AUTOINCREMENT"],
["site", "TEXT"],
["directory", "TEXT"],
["file_name", "TEXT"],
["cert_user_id", "TEXT"]
],
"indexes": ["CREATE UNIQUE INDEX path ON json(directory, site, file_name)"],
"schema_changed": 4
},
"videos": {
"cols": [
["video_id", "INTEGER"],
["ref_channel_id", "INTEGER"],
["title", "TEXT"],
["description", "TEXT"],
["tags", "TEXT"],
["original", "BOOLEAN"],
["vr", "BOOLEAN"],
["video_file", "TEXT"],
["channel_playlists", "TEXT"],
["date_added", "INTEGER"],
["json_id", "INTEGER REFERENCES json (json_id)"]
],
"indexes": ["CREATE UNIQUE INDEX video_index ON videos(json_id, video_id)", "CREATE INDEX video_id_ref_title ON videos(video_id, ref_channel_id, title)"],
"schema_changed": 14
},
"comments": {
"cols": [
["comment_id", "INTEGER"],
["ref_video_auth_address", "TEXT"],
["ref_channel_id", "INTEGER"],
["ref_video_id", "INTEGER"],
["body", "TEXT"],
["date_updated", "INTEGER"],
["date_added", "INTEGER"],
["json_id", "INTEGER REFERENCES json(json_id)"]
],
"indexes": ["CREATE UNIQUE INDEX comment_index ON comments(json_id, comment_id)", "CREATE INDEX comment_id_ref ON comments(comment_id, ref_channel_id, ref_video_id, ref_video_auth_address)"],
"schema_changed": 7
},
"category_hubs": {
"cols": [
["hub_id", "INTEGER"],
["name", "TEXT"],
["address", "TEXT"],
["description", "TEXT"],
["date_added", "INTEGER"],
["json_id", "INTEGER REFERENCES json(json_id)"]
],
"indexes": ["CREATE UNIQUE INDEX category_hub_index ON category_hubs(json_id, hub_id)", "CREATE INDEX category_hub_id_name ON category_hubs(hub_id, name)"],
"schema_changed": 9
},
"channels": {
"cols": [
["channel_id", "INTEGER"],
["name", "TEXT"],
["about", "TEXT"],
["toolbar_color", "TEXT"],
["background_color", "TEXT"],
["date_added", "INTEGER"],
["json_id", "INTEGER REFERENCES json(json_id)"]
],
"indexes": ["CREATE UNIQUE INDEX channel_index ON channels(json_id, channel_id)", "CREATE INDEX channel_id_name ON channels(channel_id, name)"],
"schema_changed": 8
},
"channel_playlists": {
"cols": [
["playlist_id", "INTEGER"],
["ref_channel_id", "INTEGER"],
["name", "TEXT"],
["date_added", "INTEGER"],
["json_id", "INTEGER REFERENCES json(json_id)"]
],
"indexes": ["CREATE UNIQUE INDEX channel_playlists_index ON channel_playlists(json_id, playlist_id)"],
"schema_changed": 4
},
"moderated_comments": {
"cols": [
["id", "INTEGER"],
["ref_comment_auth_address", "INTEGER"],
["ref_comment_id", "INTEGER"],
["date_added", "INTEGER"],
["json_id", "INTEGER REFERENCES json(json_id)"]
],
"indexes": ["CREATE UNIQUE INDEX moderated_comments_index ON moderated_comments(json_id, id)"],
"schema_changed": 4
}
}
}