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