1
0
Fork 0
peertube/server/initializers/migrations/0280-webtorrent-policy-user.ts

29 lines
650 B
TypeScript
Raw Normal View History

import * as Sequelize from 'sequelize'
async function up (utils: {
transaction: Sequelize.Transaction
queryInterface: Sequelize.QueryInterface
sequelize: Sequelize.Sequelize
}): Promise<any> {
{
const data = {
2018-10-12 12:12:39 -04:00
type: Sequelize.BOOLEAN,
allowNull: false,
2018-10-12 12:12:39 -04:00
defaultValue: true
}
2018-10-12 12:12:39 -04:00
await utils.queryInterface.addColumn('user', 'webTorrentEnabled', data)
}
}
2018-10-12 12:12:39 -04:00
async function down (utils: {
transaction: Sequelize.Transaction
queryInterface: Sequelize.QueryInterface
sequelize: Sequelize.Sequelize
}): Promise<any> {
await utils.queryInterface.removeColumn('user', 'webTorrentEnabled')
}
export { up, down }