We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b95a9b0 commit fc242feCopy full SHA for fc242fe
source/migrations/20210122184357_users_index.ts
@@ -1,14 +1,14 @@
1
import * as Knex from 'knex';
2
3
export async function up(knex: Knex): Promise<void> {
4
- knex.schema.alterTable('users', function (t) {
+ return knex.schema.alterTable('users', function (t) {
5
t.unique(['user_id']);
6
t.index(['user_id', 'lang']);
7
});
8
}
9
10
export async function down(knex: Knex): Promise<void> {
11
12
t.dropUnique(['user_id']);
13
t.dropIndex(['user_id', 'lang']);
14
0 commit comments