feat: Initial commit

This commit is contained in:
2024-12-31 17:02:29 -05:00
parent bb568ba60e
commit 8dba393267
21 changed files with 1881 additions and 63 deletions

View File

@@ -0,0 +1,19 @@
import Fluent
import Vapor
struct CreateProCon: AsyncMigration {
func prepare(on database: Database) async throws {
try await database.schema("procon")
.id()
.field("description", .string, .required)
.field("type", .string, .required)
.field("userId", .uuid, .required, .references("user", "id"))
.create()
}
func revert(on database: Database) async throws {
try await database.schema("procon").delete()
}
}

View File

@@ -0,0 +1,16 @@
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()
}
}