aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/migrations/0170-actor-follow-score.ts
blob: a12b35da9dde5e4677da8b0c2f243191479fd2b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import * as Sequelize from 'sequelize'
import { ACTOR_FOLLOW_SCORE } from '../constants'

async function up (utils: {
  transaction: Sequelize.Transaction,
  queryInterface: Sequelize.QueryInterface,
  sequelize: Sequelize.Sequelize
}): Promise<void> {
  await utils.queryInterface.removeColumn('server', 'score')

  const data = {
    type: Sequelize.INTEGER,
    allowNull: false,
    defaultValue: ACTOR_FOLLOW_SCORE.BASE
  }

  await utils.queryInterface.addColumn('actorFollow', 'score', data)

}

function down (options) {
  throw new Error('Not implemented.')
}

export {
  up,
  down
}