Fix federation of some videos
[oweals/peertube.git] / server / initializers / migrations / 0170-actor-follow-score.ts
1 import * as Sequelize from 'sequelize'
2 import { ACTOR_FOLLOW_SCORE } from '../index'
3
4 async function up (utils: {
5   transaction: Sequelize.Transaction,
6   queryInterface: Sequelize.QueryInterface,
7   sequelize: Sequelize.Sequelize
8 }): Promise<void> {
9   await utils.queryInterface.removeColumn('server', 'score')
10
11   const data = {
12     type: Sequelize.INTEGER,
13     allowNull: false,
14     defaultValue: ACTOR_FOLLOW_SCORE.BASE
15   }
16
17   await utils.queryInterface.addColumn('actorFollow', 'score', data)
18
19 }
20
21 function down (options) {
22   throw new Error('Not implemented.')
23 }
24
25 export {
26   up,
27   down
28 }