]>
Commit | Line | Data |
---|---|---|
64cc5e85 | 1 | import * as Sequelize from 'sequelize' |
64cc5e85 RK |
2 | |
3 | async function up (utils: { | |
4 | transaction: Sequelize.Transaction | |
5 | queryInterface: Sequelize.QueryInterface | |
6 | sequelize: Sequelize.Sequelize | |
7 | }): Promise<any> { | |
8 | { | |
9 | const data = { | |
ed638e53 | 10 | type: Sequelize.BOOLEAN, |
64cc5e85 | 11 | allowNull: false, |
ed638e53 | 12 | defaultValue: true |
64cc5e85 RK |
13 | } |
14 | ||
ed638e53 | 15 | await utils.queryInterface.addColumn('user', 'webTorrentEnabled', data) |
64cc5e85 RK |
16 | } |
17 | ||
18 | } | |
19 | ||
ed638e53 RK |
20 | async function down (utils: { |
21 | transaction: Sequelize.Transaction | |
22 | queryInterface: Sequelize.QueryInterface | |
23 | sequelize: Sequelize.Sequelize | |
24 | }): Promise<any> { | |
25 | await utils.queryInterface.removeColumn('user', 'webTorrentEnabled') | |
64cc5e85 RK |
26 | } |
27 | ||
28 | export { up, down } |