speed update, new table for cached stats

This commit is contained in:
Michael Simard
2021-08-04 16:32:17 -05:00
parent c38b621bdd
commit bc0dc93e9e
11 changed files with 485 additions and 139 deletions

View File

@@ -9,6 +9,7 @@ struct CreateStatistics: Migration {
.field("title", .string)
.field("wins", .int)
.field("losses", .int)
.create()
}
@@ -19,6 +20,22 @@ struct CreateStatistics: Migration {
}
struct AddCodTrackerId: Migration {
// Prepares the database for storing Galaxy models.
func prepare(on database: Database) -> EventLoopFuture<Void> {
database.schema("statistics")
.field("cod_tracker_id", .string)
.update()
}
// Optionally reverts the changes made in the prepare method.
func revert(on database: Database) -> EventLoopFuture<Void> {
database.schema("statistics").delete()
}
}
//struct CreateMatch: Migration {
// func prepare(on database: Database) -> EventLoopFuture<Void> {