Files
procons/Sources/App/Migrations/CreateUser.swift
2024-12-31 17:02:29 -05:00

17 lines
342 B
Swift

import Fluent
import Vapor
struct CreateUser: AsyncMigration {
func prepare(on database: Database) async throws {
try await database.schema("user")
.id()
.field("displayName", .string, .required)
.create()
}
func revert(on database: Database) async throws {
try await database.schema("user").delete()
}
}