diff options
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/migrations/0660-object-storage.ts | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/server/initializers/migrations/0660-object-storage.ts b/server/initializers/migrations/0660-object-storage.ts index c815c71c6..53cb89ce6 100644 --- a/server/initializers/migrations/0660-object-storage.ts +++ b/server/initializers/migrations/0660-object-storage.ts | |||
@@ -24,27 +24,25 @@ async function up (utils: { | |||
24 | } | 24 | } |
25 | 25 | ||
26 | { | 26 | { |
27 | await utils.queryInterface.addColumn('videoFile', 'storage', { type: Sequelize.INTEGER, allowNull: true }) | 27 | await utils.queryInterface.addColumn('videoFile', 'storage', { |
28 | } | 28 | type: Sequelize.INTEGER, |
29 | { | 29 | allowNull: true, |
30 | await utils.sequelize.query( | 30 | defaultValue: VideoStorage.FILE_SYSTEM |
31 | `UPDATE "videoFile" SET "storage" = ${VideoStorage.FILE_SYSTEM}` | 31 | }) |
32 | ) | 32 | await utils.queryInterface.changeColumn('videoFile', 'storage', { type: Sequelize.INTEGER, allowNull: false, defaultValue: null }) |
33 | } | ||
34 | { | ||
35 | await utils.queryInterface.changeColumn('videoFile', 'storage', { type: Sequelize.INTEGER, allowNull: false }) | ||
36 | } | 33 | } |
37 | 34 | ||
38 | { | 35 | { |
39 | await utils.queryInterface.addColumn('videoStreamingPlaylist', 'storage', { type: Sequelize.INTEGER, allowNull: true }) | 36 | await utils.queryInterface.addColumn('videoStreamingPlaylist', 'storage', { |
40 | } | 37 | type: Sequelize.INTEGER, |
41 | { | 38 | allowNull: true, |
42 | await utils.sequelize.query( | 39 | defaultValue: VideoStorage.FILE_SYSTEM |
43 | `UPDATE "videoStreamingPlaylist" SET "storage" = ${VideoStorage.FILE_SYSTEM}` | 40 | }) |
44 | ) | 41 | await utils.queryInterface.changeColumn('videoStreamingPlaylist', 'storage', { |
45 | } | 42 | type: Sequelize.INTEGER, |
46 | { | 43 | allowNull: false, |
47 | await utils.queryInterface.changeColumn('videoStreamingPlaylist', 'storage', { type: Sequelize.INTEGER, allowNull: false }) | 44 | defaultValue: null |
45 | }) | ||
48 | } | 46 | } |
49 | } | 47 | } |
50 | 48 | ||