2018-10-05 08:17:34 -05:00
|
|
|
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 11:12:39 -05:00
|
|
|
type: Sequelize.BOOLEAN,
|
2018-10-05 08:17:34 -05:00
|
|
|
allowNull: false,
|
2018-10-12 11:12:39 -05:00
|
|
|
defaultValue: true
|
2018-10-05 08:17:34 -05:00
|
|
|
}
|
|
|
|
|
2018-10-12 11:12:39 -05:00
|
|
|
await utils.queryInterface.addColumn('user', 'webTorrentEnabled', data)
|
2018-10-05 08:17:34 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2018-10-12 11:12:39 -05:00
|
|
|
async function down (utils: {
|
|
|
|
transaction: Sequelize.Transaction
|
|
|
|
queryInterface: Sequelize.QueryInterface
|
|
|
|
sequelize: Sequelize.Sequelize
|
|
|
|
}): Promise<any> {
|
|
|
|
await utils.queryInterface.removeColumn('user', 'webTorrentEnabled')
|
2018-10-05 08:17:34 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export { up, down }
|