diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-12 17:53:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-13 16:50:33 +0100 |
commit | 3fd3ab2d34d512b160a5e6084d7609be7b4f4452 (patch) | |
tree | e5ca358287fca6ecacce83defcf23af1e8e9f419 /server/initializers/migrations/0065-video-file-size.ts | |
parent | c893d4514e6ecbf282c7985fe5f82b8acd8a1137 (diff) | |
download | PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.gz PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.zst PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.zip |
Move models to typescript-sequelize
Diffstat (limited to 'server/initializers/migrations/0065-video-file-size.ts')
-rw-r--r-- | server/initializers/migrations/0065-video-file-size.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/initializers/migrations/0065-video-file-size.ts b/server/initializers/migrations/0065-video-file-size.ts index 58f8f3bcc..4e2075f8b 100644 --- a/server/initializers/migrations/0065-video-file-size.ts +++ b/server/initializers/migrations/0065-video-file-size.ts | |||
@@ -1,8 +1,7 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | 2 | import * as Promise from 'bluebird' |
3 | import { stat } from 'fs' | 3 | import { stat } from 'fs' |
4 | 4 | import { VideoModel } from '../../models/video/video' | |
5 | import { VideoInstance } from '../../models' | ||
6 | 5 | ||
7 | function up (utils: { | 6 | function up (utils: { |
8 | transaction: Sequelize.Transaction, | 7 | transaction: Sequelize.Transaction, |
@@ -11,7 +10,7 @@ function up (utils: { | |||
11 | db: any | 10 | db: any |
12 | }): Promise<void> { | 11 | }): Promise<void> { |
13 | return utils.db.Video.listOwnedAndPopulateAuthorAndTags() | 12 | return utils.db.Video.listOwnedAndPopulateAuthorAndTags() |
14 | .then((videos: VideoInstance[]) => { | 13 | .then((videos: VideoModel[]) => { |
15 | const tasks: Promise<any>[] = [] | 14 | const tasks: Promise<any>[] = [] |
16 | 15 | ||
17 | videos.forEach(video => { | 16 | videos.forEach(video => { |