Skip to content

Commit

Permalink
fix: add a DB index to player inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
niekcandaele committed Jun 26, 2024
1 parent cd14a55 commit cc807e4
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Knex } from 'knex';

export async function up(knex: Knex): Promise<void> {
await knex.schema.alterTable('playerInventory', (table) => {
table.index(['playerId', 'domain']);
});
}

export async function down(knex: Knex): Promise<void> {
await knex.schema.alterTable('playerInventory', (table) => {
table.dropIndex(['playerId', 'domain']);
});
}

0 comments on commit cc807e4

Please sign in to comment.