]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/initializers/migrations/0280-webtorrent-policy-user.ts
Try to fix video duplication
[github/Chocobozzz/PeerTube.git] / server / initializers / migrations / 0280-webtorrent-policy-user.ts
1 import * as Sequelize from 'sequelize'
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 = {
10 type: Sequelize.BOOLEAN,
11 allowNull: false,
12 defaultValue: true
13 }
14
15 await utils.queryInterface.addColumn('user', 'webTorrentEnabled', data)
16 }
17
18 }
19
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')
26 }
27
28 export { up, down }