This commit is contained in:
Michael Simard
2020-05-25 23:32:28 -05:00
parent ba9bfd5e6a
commit 676a55d2df
4 changed files with 27 additions and 22 deletions

View File

@@ -0,0 +1,19 @@
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", .bool)
.field("roundsWon", .int)
.field("roundsLost", .int)
.create()
}
func revert(on database: Database) -> EventLoopFuture<Void> {
return database.schema("matches").delete()
}
}