Fix object storage migration
It's too long on big instances
This commit is contained in:
parent
2e80d256cc
commit
e5d3e0c79d
|
@ -24,27 +24,25 @@ async function up (utils: {
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
await utils.queryInterface.addColumn('videoFile', 'storage', { type: Sequelize.INTEGER, allowNull: true })
|
await utils.queryInterface.addColumn('videoFile', 'storage', {
|
||||||
}
|
type: Sequelize.INTEGER,
|
||||||
{
|
allowNull: true,
|
||||||
await utils.sequelize.query(
|
defaultValue: VideoStorage.FILE_SYSTEM
|
||||||
`UPDATE "videoFile" SET "storage" = ${VideoStorage.FILE_SYSTEM}`
|
})
|
||||||
)
|
await utils.queryInterface.changeColumn('videoFile', 'storage', { type: Sequelize.INTEGER, allowNull: false, defaultValue: null })
|
||||||
}
|
|
||||||
{
|
|
||||||
await utils.queryInterface.changeColumn('videoFile', 'storage', { type: Sequelize.INTEGER, allowNull: false })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
await utils.queryInterface.addColumn('videoStreamingPlaylist', 'storage', { type: Sequelize.INTEGER, allowNull: true })
|
await utils.queryInterface.addColumn('videoStreamingPlaylist', 'storage', {
|
||||||
}
|
type: Sequelize.INTEGER,
|
||||||
{
|
allowNull: true,
|
||||||
await utils.sequelize.query(
|
defaultValue: VideoStorage.FILE_SYSTEM
|
||||||
`UPDATE "videoStreamingPlaylist" SET "storage" = ${VideoStorage.FILE_SYSTEM}`
|
})
|
||||||
)
|
await utils.queryInterface.changeColumn('videoStreamingPlaylist', 'storage', {
|
||||||
}
|
type: Sequelize.INTEGER,
|
||||||
{
|
allowNull: false,
|
||||||
await utils.queryInterface.changeColumn('videoStreamingPlaylist', 'storage', { type: Sequelize.INTEGER, allowNull: false })
|
defaultValue: null
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue