33 lines
860 B
Swift
33 lines
860 B
Swift
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()
|
|
}
|
|
}
|
|
|