// // File.swift // // // Created by Bill Ryckman on 4/26/23. // import Vapor import Fluent struct CreateFuelEntry: AsyncMigration { func prepare(on database: Database) async throws { try await database.schema("fuel_entries") .id() .field("timestamp", .datetime) .field("user_id", .string) .field("gps_location", .string) .field("image", .string) .field("product", .string) .field("make", .string) .field("model", .string) .field("serial_number", .string) .field("tank_id", .string) .field("fuel_amount", .double) .field("fuel_type", .string) .field("is_override", .bool) .create() } func revert(on database: Database) async throws { try await database.schema("fuel_entries").delete() } }