]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - 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
CommitLineData
64cc5e85 1import * as Sequelize from 'sequelize'
64cc5e85
RK
2
3async 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
20async 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
28export { up, down }