Faster stat processing
This commit is contained in:
32
Sources/App/Migrations/AddCODGame.swift
Normal file
32
Sources/App/Migrations/AddCODGame.swift
Normal file
@@ -0,0 +1,32 @@
|
||||
import Fluent
|
||||
|
||||
//struct CreateMatch: Migration {
|
||||
// func prepare(on database: Database) -> EventLoopFuture<Void> {
|
||||
// return database.schema("match")
|
||||
// .id()
|
||||
// .field("map", .string)
|
||||
// .field("win", .bool)
|
||||
// .field("date", .datetime)
|
||||
// .field("roundsWon", .int)
|
||||
// .field("roundsLost", .int)
|
||||
//
|
||||
// .create()
|
||||
// }
|
||||
//
|
||||
// func revert(on database: Database) -> EventLoopFuture<Void> {
|
||||
// return database.schema("matches").delete()
|
||||
// }
|
||||
//}
|
||||
|
||||
struct AddCODGame: Migration {
|
||||
|
||||
|
||||
func prepare(on database: Database) -> EventLoopFuture<Void> {
|
||||
return database.schema("match").field("codGame",.string).create()
|
||||
}
|
||||
|
||||
func revert(on database: Database) -> EventLoopFuture<Void> {
|
||||
return database.schema("matches").delete()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user