Files
cod-backend/Sources/App/Migrations/AddCODGame2.swift

38 lines
950 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 AddCODGame2: Migration {
func prepare(on database: Database) -> EventLoopFuture<Void> {
return database.schema("match")
.field("codGame",.string)
.field("notes",.string)
.field("players",.string)
.update()
}
func revert(on database: Database) -> EventLoopFuture<Void> {
return database.schema("match23es").delete()
}
}