diff options
Diffstat (limited to 'server/initializers/migrations')
-rw-r--r-- | server/initializers/migrations/0245-user-blocked.ts | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/server/initializers/migrations/0245-user-blocked.ts b/server/initializers/migrations/0245-user-blocked.ts index 67afea5ed..5a04ecd2b 100644 --- a/server/initializers/migrations/0245-user-blocked.ts +++ b/server/initializers/migrations/0245-user-blocked.ts | |||
@@ -1,8 +1,5 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import { createClient } from 'redis' | 2 | import { CONSTRAINTS_FIELDS } from '../constants' |
3 | import { CONFIG } from '../constants' | ||
4 | import { JobQueue } from '../../lib/job-queue' | ||
5 | import { initDatabaseModels } from '../database' | ||
6 | 3 | ||
7 | async function up (utils: { | 4 | async function up (utils: { |
8 | transaction: Sequelize.Transaction | 5 | transaction: Sequelize.Transaction |
@@ -31,6 +28,15 @@ async function up (utils: { | |||
31 | } | 28 | } |
32 | await utils.queryInterface.changeColumn('user', 'blocked', data) | 29 | await utils.queryInterface.changeColumn('user', 'blocked', data) |
33 | } | 30 | } |
31 | |||
32 | { | ||
33 | const data = { | ||
34 | type: Sequelize.STRING(CONSTRAINTS_FIELDS.USERS.BLOCKED_REASON.max), | ||
35 | allowNull: true, | ||
36 | defaultValue: null | ||
37 | } | ||
38 | await utils.queryInterface.addColumn('user', 'blockedReason', data) | ||
39 | } | ||
34 | } | 40 | } |
35 | 41 | ||
36 | function down (options) { | 42 | function down (options) { |