// // CreatePosts.swift // // // Created by hdesk on 04/10/22. // import Fluent struct CreatePosts: AsyncMigration { func prepare(on database: Database) async throws { try await database.schema("exploits") .field("id", .uuid, .required, .sql(raw: "UNIQUE")) .field("content", .string, .required) .field("title", .string, .required) .field("created_by", .string, .required) .field("created_at", .int, .required) .field("public", .bool, .required) .field("whitelist", .string, .required) .create() } func revert(on database: Database) async throws { try await database.schema("users").delete() } }