mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
feat: add migrations to create indexes
This commit is contained in:
parent
bd3bd7c445
commit
143ab1b4be
3 changed files with 25 additions and 0 deletions
9
server-new/mongodb/migrations/1601816721286_match.ts
Normal file
9
server-new/mongodb/migrations/1601816721286_match.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import BaseMigration from '@ioc:Mongodb/Migration'
|
||||
|
||||
export default class MatchMigration extends BaseMigration {
|
||||
public up (): void {
|
||||
// this.createCollection('matches')
|
||||
this.createIndex('matches', 'gameId')
|
||||
this.createIndex('matches', 'summoner_puuid')
|
||||
}
|
||||
}
|
||||
8
server-new/mongodb/migrations/1601819828861_summoner.ts
Normal file
8
server-new/mongodb/migrations/1601819828861_summoner.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import BaseMigration from '@ioc:Mongodb/Migration'
|
||||
|
||||
export default class SummonerMigration extends BaseMigration {
|
||||
public up (): void {
|
||||
// this.createCollection('summoners')
|
||||
this.createIndex('summoners', 'puuid')
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
import BaseMigration from '@ioc:Mongodb/Migration'
|
||||
|
||||
export default class DetailedMatchMigration extends BaseMigration {
|
||||
public up (): void {
|
||||
// this.createCollection('detailed_matches')
|
||||
this.createIndex('detailed_matches', 'gameId')
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue