Commit Graph

47 Commits

Author SHA1 Message Date
broquemonsieur
6b984c6677 Remove files that were prematurely added and add backend Compilation files 2023-09-02 17:15:10 -07:00
broquemonsieur
bef234fd74 Add compilations to DB 2023-09-02 17:15:10 -07:00
broquemonsieur
24f55a7876 Add backend Compilation symbols 2023-09-02 17:15:10 -07:00
Tony Finn
cdc007c83c
Specify the public schema for public videos
Unlike the other migrations, this one uses a bare table name to specify the table. This means it looks in the default search path. Unfortunately, the out of box search path is:

1. Schema with the same name as the user
2. Public

Because of this, if a schema exists with the same name as the DB user, the playlist_videos table will get created in _that_ schema, rather than the public schema, and then the grant statement will fail with an error like below if check_table is enabled as it keeps trying to create the table but failing on the grant statement:

```
2022-01-22 02:27:42 UTC [info] check_table: check_table: CREATE TABLE playlist_videos
Unhandled exception: relation "public.playlist_videos" does not exist (PQ::PQError)
  from /usr/share/crystal/src/primitives.cr:266:3 in 'handle_error'
  from lib/pg/src/pq/connection.cr:184:9 in 'handle_async_frames'
  from lib/pg/src/pq/connection.cr:162:7 in 'read'
  from lib/pg/src/pq/query.cr:53:14 in 'exec_all'
  from lib/db/src/db/database.cr:126:9 in '__crystal_main'
  from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main'
  from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2'
2022-01-22 02:27:43 UTC [info] check_table: check_table: CREATE TABLE playlist_videos
Unhandled exception: relation "public.playlist_videos" does not exist (PQ::PQError)
  from /usr/share/crystal/src/primitives.cr:266:3 in 'handle_error'
  from lib/pg/src/pq/connection.cr:184:9 in 'handle_async_frames'
  from lib/pg/src/pq/connection.cr:162:7 in 'read'
  from lib/pg/src/pq/query.cr:53:14 in 'exec_all'
  from lib/db/src/db/database.cr:126:9 in '__crystal_main'
  from /usr/share/crystal/src/crystal/main.cr:110:5 in 'main'
  from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2'
```
2022-01-22 02:32:13 +00:00
Émilien Devos
7b9f5d74dc Create videos caching table as UNLOGGED 2022-01-09 16:58:29 +00:00
Andre Borie
ffa9e5dfab Make migrations (mostly) idempotent. 2021-01-17 14:20:34 +00:00
Omar Roth
1eca969cf6
Add support for polymer redesign 2020-06-15 18:18:04 -05:00
Omar Roth
61150c74d2
Move privacy type into playlists.sql 2020-04-14 18:09:48 -05:00
Omar Roth
be055d9dcb
Add support for custom playlists 2019-10-15 21:17:14 -04:00
Omar Roth
18d66ddded
Add 'needs_update' column for scheduling feed refresh 2019-06-01 10:19:18 -05:00
Omar Roth
64464f23ae
Add 'views' to channel_videos 2019-05-30 18:59:13 -05:00
Omar Roth
42dd6326d5 Remove unnecessary index 2019-04-28 14:11:23 -05:00
Omar Roth
3bcb98e644 Add config option to cache annotations from IA 2019-04-15 11:13:09 -05:00
Omar Roth
fd26f9f34e Add support for premieres to search and feed 2019-03-22 14:54:35 -05:00
Omar Roth
7425700009 Update pubsub to support lease_seconds 2019-03-03 20:40:24 -06:00
Omar Roth
52cad8d6da Update change index for channel_videos and add index for nonces 2019-02-11 10:59:17 -06:00
Omar Roth
ff563a70a5 Fix typo in session_ids 2019-02-10 15:08:53 -06:00
Omar Roth
a384f6e5fd Add migrate script and update README 2019-02-10 12:46:58 -06:00
Omar Roth
3646395f1d Store session_ids in separate table 2019-02-10 12:33:29 -06:00
Omar Roth
30e6d29106 Add 'deleted' to channel info 2019-02-09 10:49:48 -06:00
Omar Roth
a242390fc1 Fix typo in nonces.sql 2018-11-20 13:14:13 -06:00
Omar Roth
ad20d6359b Add 'expire' to filter invalid tokens 2018-11-19 18:41:11 -06:00
Omar Roth
d185ba84bf Remember nonce to prevent replay attacks 2018-11-17 13:18:12 -06:00
Omar Roth
19632511d5 Update SQL 2018-11-02 09:46:45 -05:00
Omar Roth
c55c553725 Fix channel_videos schema 2018-10-30 10:50:27 -05:00
Omar Roth
8794e26e67 Add length_seconds to channel_videos 2018-10-30 09:20:51 -05:00
Omar Roth
f88697541c Add author_thumbnail to '/api/v1/videos' 2018-10-13 20:01:58 -05:00
Omar Roth
1a39faee75 Add subCountText and add XHR alternative for subscribing to channels 2018-10-12 21:17:37 -05:00
Omar Roth
51d00b16c3 Use hash instead of btree for channel_videos_ucid_idx 2018-09-21 08:52:27 -05:00
Omar Roth
5b2c228bb6 Add 'license' 2018-09-09 14:47:26 -05:00
Omar Roth
40028e1462 Update SQL and remove migration points 2018-09-04 09:57:40 -05:00
Omar Roth
74cf3d18d0 Remove ID constrant for users 2018-08-15 19:30:13 -05:00
Omar Roth
8adb4650a0 Add support for multiple sessions 2018-08-15 12:40:42 -05:00
Omar Roth
b5c92c1a2f Add watch history 2018-07-29 09:00:32 -05:00
Omar Roth
b13b91e2bf Add ucid index for channel_videos 2018-07-27 17:38:47 -05:00
Omar Roth
09a9364427 Update videos SQL 2018-07-26 14:49:06 -05:00
Omar Roth
99ff27dae3 Update users.sql 2018-07-20 18:41:23 -05:00
Omar Roth
d29ea79a5d Add separate user accounts 2018-07-18 20:15:18 -05:00
Omar Roth
c928a938f9 Fix typo in users.sql 2018-07-18 20:07:24 -05:00
Omar Roth
96c520b02b Add user preferences 2018-07-16 11:24:24 -05:00
Omar Roth
a2e23f7022 Move author and ucid into schema 2018-06-01 17:24:16 -05:00
Omar Roth
57102c54c7 Add notifications 2018-03-31 19:09:27 -05:00
Omar Roth
ffdf2ea4c5 Add email to user table 2018-03-31 10:30:17 -05:00
Omar Roth
0aa8ad9a7c Make user id unique 2018-03-29 22:27:51 -05:00
Omar Roth
6c4cfbe39d Add users table 2018-03-29 21:41:05 -05:00
Omar Roth
239a6c892c Use seperate table for videos pulled from RSS 2018-03-28 22:29:54 -05:00
Omar Roth
908543dd62 Add channel sql 2018-03-24 22:44:17 -05:00