diff options
author | kontrollanten <6680299+kontrollanten@users.noreply.github.com> | 2022-06-21 15:31:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-21 15:31:25 +0200 |
commit | 2e401e8575decb1d491d0db48ca1ab1eba5b2a66 (patch) | |
tree | eee1e6213ca4d635837ca01c2bdc5c876b8d8b7d /server/initializers/database.ts | |
parent | dec49521556fc228c6e05b6199e9b07f619b38fb (diff) | |
download | PeerTube-2e401e8575decb1d491d0db48ca1ab1eba5b2a66.tar.gz PeerTube-2e401e8575decb1d491d0db48ca1ab1eba5b2a66.tar.zst PeerTube-2e401e8575decb1d491d0db48ca1ab1eba5b2a66.zip |
store uploaded video filename (#4885)
* store uploaded video filename
closes #4731
* dont crash if videos channel exist
* migration: use raw query
* video source: fixes after code review
* cleanup
* bump migration
* updates after code review
* refactor: use checkUserCanManageVideo
* videoSource: add openapi doc
* test(check-params/video-source): fix timeout
* Styling
* Correctly set original filename as source
Co-authored-by: Chocobozzz <me@florianbigard.com>
Diffstat (limited to 'server/initializers/database.ts')
-rw-r--r-- | server/initializers/database.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/initializers/database.ts b/server/initializers/database.ts index 3576f444c..09786a91f 100644 --- a/server/initializers/database.ts +++ b/server/initializers/database.ts | |||
@@ -49,6 +49,7 @@ import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-pla | |||
49 | import { VideoTagModel } from '../models/video/video-tag' | 49 | import { VideoTagModel } from '../models/video/video-tag' |
50 | import { VideoViewModel } from '../models/view/video-view' | 50 | import { VideoViewModel } from '../models/view/video-view' |
51 | import { CONFIG } from './config' | 51 | import { CONFIG } from './config' |
52 | import { VideoSourceModel } from '@server/models/video/video-source' | ||
52 | 53 | ||
53 | require('pg').defaults.parseInt8 = true // Avoid BIGINT to be converted to string | 54 | require('pg').defaults.parseInt8 = true // Avoid BIGINT to be converted to string |
54 | 55 | ||
@@ -126,6 +127,7 @@ async function initDatabaseModels (silent: boolean) { | |||
126 | VideoChannelModel, | 127 | VideoChannelModel, |
127 | VideoShareModel, | 128 | VideoShareModel, |
128 | VideoFileModel, | 129 | VideoFileModel, |
130 | VideoSourceModel, | ||
129 | VideoCaptionModel, | 131 | VideoCaptionModel, |
130 | VideoBlacklistModel, | 132 | VideoBlacklistModel, |
131 | VideoTagModel, | 133 | VideoTagModel, |