1
0
Fork 0
peertube/server/initializers/migrations/0450-streaming-playlist-files.ts
Chocobozzz d7a25329f9
Add ability to disable webtorrent
In favour of HLS
2019-11-25 10:59:43 +01:00

40 lines
760 B
TypeScript

import * as Sequelize from 'sequelize'
async function up (utils: {
transaction: Sequelize.Transaction,
queryInterface: Sequelize.QueryInterface,
sequelize: Sequelize.Sequelize,
db: any
}): Promise<void> {
{
const data = {
type: Sequelize.INTEGER,
allowNull: true,
references: {
model: 'videoStreamingPlaylist',
key: 'id'
},
onDelete: 'CASCADE'
}
await utils.queryInterface.addColumn('videoFile', 'videoStreamingPlaylistId', data)
}
{
const data = {
type: Sequelize.INTEGER,
allowNull: true
}
await utils.queryInterface.changeColumn('videoFile', 'videoId', data)
}
}
function down (options) {
throw new Error('Not implemented.')
}
export {
up,
down
}