選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

15 行
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. }