Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

15 righe
358 B

  1. import Fluent
  2. struct CreateTodo: AsyncMigration {
  3. func prepare(on database: Database) async throws {
  4. try await database.schema("todos")
  5. .id()
  6. .field("title", .string, .required)
  7. .create()
  8. }
  9. func revert(on database: Database) async throws {
  10. try await database.schema("todos").delete()
  11. }
  12. }