aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/migrations')
-rw-r--r--server/initializers/migrations/0170-actor-follow-score.ts28
1 files changed, 28 insertions, 0 deletions
diff --git a/server/initializers/migrations/0170-actor-follow-score.ts b/server/initializers/migrations/0170-actor-follow-score.ts
new file mode 100644
index 000000000..2deabaf98
--- /dev/null
+++ b/server/initializers/migrations/0170-actor-follow-score.ts
@@ -0,0 +1,28 @@
1import * as Sequelize from 'sequelize'
2import { ACTOR_FOLLOW_SCORE } from '../index'
3
4async 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
21function down (options) {
22 throw new Error('Not implemented.')
23}
24
25export {
26 up,
27 down
28}