2018-10-05 09:17:34 -04: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 12:12:39 -04:00
|
|
|
type: Sequelize.BOOLEAN,
|
2018-10-05 09:17:34 -04:00
|
|
|
allowNull: false,
|
2018-10-12 12:12:39 -04:00
|
|
|
defaultValue: true
|
2018-10-05 09:17:34 -04:00
|
|
|
}
|
|
|
|
|
2018-10-12 12:12:39 -04:00
|
|
|
await utils.queryInterface.addColumn('user', 'webTorrentEnabled', data)
|
2018-10-05 09:17:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
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')
|
2018-10-05 09:17:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export { up, down }
|