diff --git a/source/migrations/20210122184357_users_index.ts b/source/migrations/20210122184357_users_index.ts index bedf42444c0..c0f72f61074 100644 --- a/source/migrations/20210122184357_users_index.ts +++ b/source/migrations/20210122184357_users_index.ts @@ -1,14 +1,14 @@ import * as Knex from 'knex'; export async function up(knex: Knex): Promise { - knex.schema.alterTable('users', function (t) { + return knex.schema.alterTable('users', function (t) { t.unique(['user_id']); t.index(['user_id', 'lang']); }); } export async function down(knex: Knex): Promise { - knex.schema.alterTable('users', function (t) { + return knex.schema.alterTable('users', function (t) { t.dropUnique(['user_id']); t.dropIndex(['user_id', 'lang']); });