diff --git a/server/database/migrations/1695597807759_update_indexes.ts b/server/database/migrations/1695597807759_update_indexes.ts new file mode 100644 index 0000000..7f0a699 --- /dev/null +++ b/server/database/migrations/1695597807759_update_indexes.ts @@ -0,0 +1,16 @@ +import BaseSchema from '@ioc:Adonis/Lucid/Schema' + +export default class extends BaseSchema { + public async up() { + this.schema.alterTable('matches', (table) => { + table.index(['id', 'gamemode'], 'matches_combined_index1') + }) + + this.schema.alterTable('match_players', (table) => { + table.index(['summoner_puuid', 'remake', 'match_id'], 'match_players_combined_index1') + table.index(['match_id', 'team', 'summoner_puuid'], 'match_players_combined_index2') + }) + } + + public async down() {} +}