2018-01-11 09:35:50 +01:00
|
|
|
import * as Sequelize from 'sequelize'
|
2019-04-11 14:26:41 +02:00
|
|
|
import { ACTOR_FOLLOW_SCORE } from '../constants'
|
2018-01-11 09:35:50 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|