|
13 | 13 | - [archivedSponsorTimes](#archivedsponsortimes)
|
14 | 14 | - [ratings](#ratings)
|
15 | 15 | - [userFeatures](#userFeatures)
|
| 16 | +- [shadowBannedIPs](#shadowBannedIPs) |
16 | 17 | - [titles](#titles)
|
17 | 18 | - [titleVotes](#titleVotes)
|
18 | 19 | - [thumbnails](#thumbnails)
|
| 20 | +- [thumbnailTimestamps](#thumbnailTimestamps) |
19 | 21 | - [thumbnailVotes](#thumbnailVotes)
|
20 | 22 |
|
21 | 23 | ### vipUsers
|
22 | 24 | | Name | Type | |
|
23 | 25 | | -- | :--: | -- |
|
24 |
| -| userID | TEXT | not null | |
| 26 | +| userID | TEXT | not null, primary key | |
25 | 27 |
|
26 | 28 | | index | field |
|
27 | 29 | | -- | :--: |
|
|
37 | 39 | | votes | INTEGER | not null |
|
38 | 40 | | locked | INTEGER | not null, default '0' |
|
39 | 41 | | incorrectVotes | INTEGER | not null, default 1 |
|
40 |
| -| UUID | TEXT | not null, unique | |
| 42 | +| UUID | TEXT | not null, unique, primary key | |
41 | 43 | | userID | TEXT | not null |
|
42 | 44 | | timeSubmitted | INTEGER | not null |
|
43 | 45 | | views | INTEGER | not null |
|
|
66 | 68 |
|
67 | 69 | | Name | Type | |
|
68 | 70 | | -- | :--: | -- |
|
69 |
| -| userID | TEXT | not null | |
| 71 | +| userID | TEXT | not null, primary key | |
70 | 72 | | userName | TEXT | not null |
|
71 | 73 | | locked | INTEGER | not nul, default '0' |
|
72 | 74 |
|
|
81 | 83 | | UUID | TEXT | not null |
|
82 | 84 | | category | TEXT | not null |
|
83 | 85 | | votes | INTEGER | not null, default 0 |
|
| 86 | +| id | SERIAL | primary key |
84 | 87 |
|
85 | 88 | | index | field |
|
86 | 89 | | -- | :--: |
|
|
97 | 100 | | hashedVideoID | TEXT | not null, default '' |
|
98 | 101 | | reason | TEXT | not null, default '' |
|
99 | 102 | | service | TEXT | not null, default 'YouTube' |
|
| 103 | +| id | SERIAL | primary key |
100 | 104 |
|
101 | 105 | | index | field |
|
102 | 106 | | -- | :--: |
|
|
111 | 115 | | issuerUserID | TEXT | not null |
|
112 | 116 | | enabled | INTEGER | not null |
|
113 | 117 | | reason | TEXT | not null, default '' |
|
| 118 | +| type | INTEGER | default 0 | |
| 119 | + |
| 120 | +| constraint | field | |
| 121 | +| -- | :--: | |
| 122 | +| PRIMARY KEY | userID, issueTime | |
114 | 123 |
|
115 | 124 | | index | field |
|
116 | 125 | | -- | :--: |
|
|
121 | 130 |
|
122 | 131 | | Name | Type | |
|
123 | 132 | | -- | :--: | -- |
|
124 |
| -| userID | TEXT | not null | |
| 133 | +| userID | TEXT | not null, primary key | |
125 | 134 |
|
126 | 135 | | index | field |
|
127 | 136 | | -- | :--: |
|
|
151 | 160 | | channelID | TEXT | not null |
|
152 | 161 | | timeSubmitted | INTEGER | not null |
|
153 | 162 | | service | TEXT | not null, default 'YouTube' |
|
| 163 | +| id | SERIAL | primary key |
154 | 164 |
|
155 | 165 | ### config
|
156 | 166 |
|
157 | 167 | | Name | Type | |
|
158 | 168 | | -- | :--: | -- |
|
159 |
| -| key | TEXT | not null, unique | |
| 169 | +| key | TEXT | not null, unique, primary key | |
160 | 170 | | value | TEXT | not null |
|
161 | 171 |
|
162 | 172 | ### archivedSponsorTimes
|
|
169 | 179 | | votes | INTEGER | not null |
|
170 | 180 | | locked | INTEGER | not null, default '0' |
|
171 | 181 | | incorrectVotes | INTEGER | not null, default 1 |
|
172 |
| -| UUID | TEXT | not null, unique | |
| 182 | +| UUID | TEXT | not null, unique, primary key | |
173 | 183 | | userID | TEXT | not null |
|
174 | 184 | | timeSubmitted | INTEGER | not null |
|
175 | 185 | | views | INTEGER | not null |
|
|
182 | 192 | | shadowHidden | INTEGER | not null |
|
183 | 193 | | hashedVideoID | TEXT | not null, default '', sha256 |
|
184 | 194 | | userAgent | TEXT | not null, default '' |
|
| 195 | +| description | TEXT | not null, default '' | |
185 | 196 |
|
186 | 197 | ### ratings
|
187 | 198 |
|
|
192 | 203 | | type | INTEGER | not null |
|
193 | 204 | | count | INTEGER | not null |
|
194 | 205 | | hashedVideoID | TEXT | not null |
|
| 206 | +| id | SERIAL | primary key |
195 | 207 |
|
196 | 208 | | index | field |
|
197 | 209 | | -- | :--: |
|
|
200 | 212 | | ratings_videoID | videoID, service |
|
201 | 213 |
|
202 | 214 | ### userFeatures
|
| 215 | +| userID | TEXT | not null | |
| 216 | +| feature | INTEGER | not null | |
| 217 | +| issuerUserID | TEXT | not null | |
| 218 | +| timeSubmitted | INTEGER | not null | |
| 219 | + |
| 220 | +| constraint | field | |
| 221 | +| -- | :--: | |
| 222 | +| primary key | userID, feature | |
203 | 223 |
|
204 | 224 | | index | field |
|
205 | 225 | | -- | :--: |
|
206 | 226 | | userFeatures_userID | userID, feature |
|
207 | 227 |
|
| 228 | +### shadowBannedIPs |
| 229 | + |
| 230 | +| Name | Type | | |
| 231 | +| -- | :--: | -- | |
| 232 | +| hashedIP | TEXT | not null, primary key | |
| 233 | + |
208 | 234 | ### titles
|
209 | 235 |
|
| 236 | +| Name | Type | | |
| 237 | +| -- | :--: | -- | |
| 238 | +| videoID | TEXT | not null | |
| 239 | +| title | TEXT | not null | |
| 240 | +| original | INTEGER | default 0 | |
| 241 | +| userID | TEXT | not null |
| 242 | +| service | TEXT not null | |
| 243 | +| hashedVideoID | TEXT | not null | |
| 244 | +| timeSubmitted | INTEGER | not null | |
| 245 | +| UUID | TEXT | not null, primary key |
| 246 | + |
210 | 247 | | index | field |
|
211 | 248 | | -- | :--: |
|
212 | 249 | | titles_timeSubmitted | timeSubmitted |
|
|
215 | 252 | | titles_hashedVideoID_2 | service, hashedVideoID, timeSubmitted |
|
216 | 253 |
|
217 | 254 | ### titleVotes
|
| 255 | + |
| 256 | +| Name | Type | | |
| 257 | +| -- | :--: | -- | |
| 258 | +| UUID | TEXT | not null, primary key | |
| 259 | +| votes | INTEGER | not null, default 0 | |
| 260 | +| locked | INTEGER | not null, default 0 | |
| 261 | +| shadowHidden | INTEGER | not null, default 0 | |
| 262 | +| verification | INTEGER | default 0 | |
| 263 | +| downvotes | INTEGER | default 0 | |
| 264 | +| removed | INTEGER | default 0 | |
| 265 | + |
| 266 | +| constraint | field | |
| 267 | +| -- | :--: | |
| 268 | +| foreign key | UUID references "titles"("UUID") |
| 269 | + |
218 | 270 | | index | field |
|
219 | 271 | | -- | :--: |
|
220 | 272 | | titleVotes_votes | UUID, votes
|
221 | 273 |
|
222 | 274 | ### thumbnails
|
| 275 | + |
| 276 | +| Name | Type | | |
| 277 | +| -- | :--: | -- | |
| 278 | +| UUID | TEXT | not null | |
| 279 | +| original | INTEGER | default 0 | |
| 280 | +| userID | TEXT | not null | |
| 281 | +| service | TEXT | not null | |
| 282 | +| hashedVideoID | TEXT | not null | |
| 283 | +| timeSubmitted | INTEGER | not null | |
| 284 | +| UUID | TEXT | not null, primary key | |
| 285 | + |
223 | 286 | | index | field |
|
224 | 287 | | -- | :--: |
|
225 | 288 | | thumbnails_timeSubmitted | timeSubmitted |
|
226 | 289 | | thumbnails_votes_timeSubmitted | videoID, service, userID, timeSubmitted |
|
227 | 290 | | thumbnails_videoID | videoID, service |
|
228 | 291 | | thumbnails_hashedVideoID_2 | service, hashedVideoID, timeSubmitted |
|
229 | 292 |
|
| 293 | +### thumbnailTimestamps |
| 294 | + |
| 295 | +| index | field | |
| 296 | +| -- | :--: | |
| 297 | +| UUID | TEXT | not null, primary key |
| 298 | +| timestamp | INTEGER | not null, default 0 |
| 299 | + |
| 300 | +| constraint | field | |
| 301 | +| -- | :--: | |
| 302 | +| foreign key | UUID references "thumbnails"("UUID") |
| 303 | + |
230 | 304 | ### thumbnailVotes
|
| 305 | + |
| 306 | +| index | field | |
| 307 | +| -- | :--: | |
| 308 | +| UUID | TEXT | not null, primary key | |
| 309 | +| votes | INTEGER | not null, default 0 | |
| 310 | +| locked | INTEGER |not null, default 0 | |
| 311 | +| shadowHidden | INTEGER | not null, default 0 | |
| 312 | +| downvotes | INTEGER | default 0 | |
| 313 | +| removed | INTEGER | default 0 | |
| 314 | + |
| 315 | +| constraint | field | |
| 316 | +| -- | :--: | |
| 317 | +| foreign key | UUID references "thumbnails"("UUID") |
| 318 | + |
231 | 319 | | index | field |
|
232 | 320 | | -- | :--: |
|
233 | 321 | | thumbnailVotes_votes | UUID, votes
|
|
0 commit comments