Skip to content

Commit

Permalink
fix: alertTable
Browse files Browse the repository at this point in the history
  • Loading branch information
fengkx committed Jan 22, 2021
1 parent b95a9b0 commit fc242fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/migrations/20210122184357_users_index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as Knex from 'knex';

export async function up(knex: Knex): Promise<void> {
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<void> {
knex.schema.alterTable('users', function (t) {
return knex.schema.alterTable('users', function (t) {
t.dropUnique(['user_id']);
t.dropIndex(['user_id', 'lang']);
});
Expand Down

0 comments on commit fc242fe

Please sign in to comment.