diff options
Diffstat (limited to 'server/initializers/migrations')
17 files changed, 4 insertions, 17 deletions
diff --git a/server/initializers/migrations/0005-email-pod.ts b/server/initializers/migrations/0005-email-pod.ts index 417c33b1f..025bcdb59 100644 --- a/server/initializers/migrations/0005-email-pod.ts +++ b/server/initializers/migrations/0005-email-pod.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | import { Migration } from '../../models/migrations' | 2 | import { Migration } from '../../models/migrations' |
4 | 3 | ||
5 | function up (utils: { | 4 | function up (utils: { |
diff --git a/server/initializers/migrations/0010-email-user.ts b/server/initializers/migrations/0010-email-user.ts index f7d01f6d6..4193b7ff9 100644 --- a/server/initializers/migrations/0010-email-user.ts +++ b/server/initializers/migrations/0010-email-user.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | import { Migration } from '../../models/migrations' | 2 | import { Migration } from '../../models/migrations' |
4 | 3 | ||
5 | function up (utils: { | 4 | function up (utils: { |
diff --git a/server/initializers/migrations/0015-video-views.ts b/server/initializers/migrations/0015-video-views.ts index 47dd4069b..aa80ffbcc 100644 --- a/server/initializers/migrations/0015-video-views.ts +++ b/server/initializers/migrations/0015-video-views.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | 2 | ||
4 | function up (utils: { | 3 | function up (utils: { |
5 | transaction: Sequelize.Transaction | 4 | transaction: Sequelize.Transaction |
diff --git a/server/initializers/migrations/0020-video-likes.ts b/server/initializers/migrations/0020-video-likes.ts index 44333f3b0..aae815a8e 100644 --- a/server/initializers/migrations/0020-video-likes.ts +++ b/server/initializers/migrations/0020-video-likes.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | 2 | ||
4 | function up (utils: { | 3 | function up (utils: { |
5 | transaction: Sequelize.Transaction | 4 | transaction: Sequelize.Transaction |
diff --git a/server/initializers/migrations/0025-video-dislikes.ts b/server/initializers/migrations/0025-video-dislikes.ts index 2aa22e2d7..6eb6fb9dc 100644 --- a/server/initializers/migrations/0025-video-dislikes.ts +++ b/server/initializers/migrations/0025-video-dislikes.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | 2 | ||
4 | function up (utils: { | 3 | function up (utils: { |
5 | transaction: Sequelize.Transaction | 4 | transaction: Sequelize.Transaction |
diff --git a/server/initializers/migrations/0030-video-category.ts b/server/initializers/migrations/0030-video-category.ts index 00cd2d8cf..dd3922549 100644 --- a/server/initializers/migrations/0030-video-category.ts +++ b/server/initializers/migrations/0030-video-category.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | import { Migration } from '../../models/migrations' | 2 | import { Migration } from '../../models/migrations' |
4 | 3 | ||
5 | function up (utils: { | 4 | function up (utils: { |
diff --git a/server/initializers/migrations/0035-video-licence.ts b/server/initializers/migrations/0035-video-licence.ts index 61d666c5e..b4224d758 100644 --- a/server/initializers/migrations/0035-video-licence.ts +++ b/server/initializers/migrations/0035-video-licence.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | import { Migration } from '../../models/migrations' | 2 | import { Migration } from '../../models/migrations' |
4 | 3 | ||
5 | function up (utils: { | 4 | function up (utils: { |
diff --git a/server/initializers/migrations/0040-video-nsfw.ts b/server/initializers/migrations/0040-video-nsfw.ts index 44aec8a6c..d5aad3e53 100644 --- a/server/initializers/migrations/0040-video-nsfw.ts +++ b/server/initializers/migrations/0040-video-nsfw.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | import { Migration } from '../../models/migrations' | 2 | import { Migration } from '../../models/migrations' |
4 | 3 | ||
5 | function up (utils: { | 4 | function up (utils: { |
diff --git a/server/initializers/migrations/0045-user-display-nsfw.ts b/server/initializers/migrations/0045-user-display-nsfw.ts index 07795bd75..5226a25eb 100644 --- a/server/initializers/migrations/0045-user-display-nsfw.ts +++ b/server/initializers/migrations/0045-user-display-nsfw.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | 2 | ||
4 | function up (utils: { | 3 | function up (utils: { |
5 | transaction: Sequelize.Transaction | 4 | transaction: Sequelize.Transaction |
diff --git a/server/initializers/migrations/0050-video-language.ts b/server/initializers/migrations/0050-video-language.ts index 6f90abb44..0cd518272 100644 --- a/server/initializers/migrations/0050-video-language.ts +++ b/server/initializers/migrations/0050-video-language.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | 2 | ||
4 | function up (utils: { | 3 | function up (utils: { |
5 | transaction: Sequelize.Transaction | 4 | transaction: Sequelize.Transaction |
diff --git a/server/initializers/migrations/0055-video-uuid.ts b/server/initializers/migrations/0055-video-uuid.ts index 8a58aebb8..525a69ea5 100644 --- a/server/initializers/migrations/0055-video-uuid.ts +++ b/server/initializers/migrations/0055-video-uuid.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | import { Migration } from '../../models/migrations' | 2 | import { Migration } from '../../models/migrations' |
4 | 3 | ||
5 | function up (utils: { | 4 | function up (utils: { |
diff --git a/server/initializers/migrations/0060-video-file.ts b/server/initializers/migrations/0060-video-file.ts index 00647e60e..f07fa7780 100644 --- a/server/initializers/migrations/0060-video-file.ts +++ b/server/initializers/migrations/0060-video-file.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | 2 | ||
4 | function up (utils: { | 3 | function up (utils: { |
5 | transaction: Sequelize.Transaction | 4 | transaction: Sequelize.Transaction |
diff --git a/server/initializers/migrations/0065-video-file-size.ts b/server/initializers/migrations/0065-video-file-size.ts index 0bdc675c2..1aeb27f2d 100644 --- a/server/initializers/migrations/0065-video-file-size.ts +++ b/server/initializers/migrations/0065-video-file-size.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | import { stat } from 'fs-extra' | 2 | import { stat } from 'fs-extra' |
4 | import { VideoModel } from '../../models/video/video' | 3 | import { VideoModel } from '../../models/video/video' |
5 | import { getVideoFilePath } from '@server/lib/video-paths' | 4 | import { getVideoFilePath } from '@server/lib/video-paths' |
diff --git a/server/initializers/migrations/0070-user-video-quota.ts b/server/initializers/migrations/0070-user-video-quota.ts index 1d073f244..3fc4d2970 100644 --- a/server/initializers/migrations/0070-user-video-quota.ts +++ b/server/initializers/migrations/0070-user-video-quota.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | import { Migration } from '../../models/migrations' | 2 | import { Migration } from '../../models/migrations' |
4 | 3 | ||
5 | function up (utils: { | 4 | function up (utils: { |
diff --git a/server/initializers/migrations/0130-user-autoplay-video.ts b/server/initializers/migrations/0130-user-autoplay-video.ts index d57934588..8f2767266 100644 --- a/server/initializers/migrations/0130-user-autoplay-video.ts +++ b/server/initializers/migrations/0130-user-autoplay-video.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import * as Promise from 'bluebird' | ||
3 | 2 | ||
4 | function up (utils: { | 3 | function up (utils: { |
5 | transaction: Sequelize.Transaction | 4 | transaction: Sequelize.Transaction |
diff --git a/server/initializers/migrations/0150-avatar-cascade.ts b/server/initializers/migrations/0150-avatar-cascade.ts index fb3b25773..ecf3467a0 100644 --- a/server/initializers/migrations/0150-avatar-cascade.ts +++ b/server/initializers/migrations/0150-avatar-cascade.ts | |||
@@ -7,7 +7,8 @@ async function up (utils: { | |||
7 | }): Promise<void> { | 7 | }): Promise<void> { |
8 | await utils.queryInterface.removeConstraint('actor', 'actor_avatarId_fkey') | 8 | await utils.queryInterface.removeConstraint('actor', 'actor_avatarId_fkey') |
9 | 9 | ||
10 | await utils.queryInterface.addConstraint('actor', [ 'avatarId' ], { | 10 | await utils.queryInterface.addConstraint('actor', { |
11 | fields: [ 'avatarId' ], | ||
11 | type: 'foreign key', | 12 | type: 'foreign key', |
12 | references: { | 13 | references: { |
13 | table: 'avatar', | 14 | table: 'avatar', |
diff --git a/server/initializers/migrations/0410-video-playlist-element.ts b/server/initializers/migrations/0410-video-playlist-element.ts index 1b4692357..be61b932b 100644 --- a/server/initializers/migrations/0410-video-playlist-element.ts +++ b/server/initializers/migrations/0410-video-playlist-element.ts | |||
@@ -18,7 +18,8 @@ async function up (utils: { | |||
18 | 18 | ||
19 | await utils.queryInterface.removeConstraint('videoPlaylistElement', 'videoPlaylistElement_videoId_fkey') | 19 | await utils.queryInterface.removeConstraint('videoPlaylistElement', 'videoPlaylistElement_videoId_fkey') |
20 | 20 | ||
21 | await utils.queryInterface.addConstraint('videoPlaylistElement', [ 'videoId' ], { | 21 | await utils.queryInterface.addConstraint('videoPlaylistElement', { |
22 | fields: [ 'videoId' ], | ||
22 | type: 'foreign key', | 23 | type: 'foreign key', |
23 | references: { | 24 | references: { |
24 | table: 'video', | 25 | table: 'video', |