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: {
|
2020-01-31 16:56:52 +01:00
|
|
|
transaction: Sequelize.Transaction
|
|
|
|
queryInterface: Sequelize.QueryInterface
|
2018-01-11 09:35:50 +01:00
|
|
|
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
|
|
|
|
}
|