diff --git a/packages/lib-db/src/migrations/sql/20240626200803-player-inventory-idx.ts b/packages/lib-db/src/migrations/sql/20240626200803-player-inventory-idx.ts new file mode 100644 index 0000000000..ef34bd050e --- /dev/null +++ b/packages/lib-db/src/migrations/sql/20240626200803-player-inventory-idx.ts @@ -0,0 +1,13 @@ +import { Knex } from 'knex'; + +export async function up(knex: Knex): Promise { + await knex.schema.alterTable('playerInventory', (table) => { + table.index(['playerId', 'domain']); + }); +} + +export async function down(knex: Knex): Promise { + await knex.schema.alterTable('playerInventory', (table) => { + table.dropIndex(['playerId', 'domain']); + }); +}