feat: Add indexes to token and userId columns of access tokens

This commit is contained in:
Faruk AYDIN
2024-04-24 12:03:45 +02:00
parent 6a7cdf2570
commit 2a4f8ed45f

View File

@@ -0,0 +1,13 @@
export async function up(knex) {
return knex.schema.table('access_tokens', (table) => {
table.index('token');
table.index('user_id');
});
}
export async function down(knex) {
return knex.schema.table('access_tokens', (table) => {
table.dropIndex('token');
table.dropIndex('user_id');
});
}