AddFoodDrinkCategory

struct AddFoodDrinkCategory : AsyncMigration
  • prepare(on:) Asynchronous

    Required by Migration protocol. Inserts the Food & Drink category.

    Declaration

    Swift

    func prepare(on database: Database) async throws

    Parameters

    database

    A connection to the database, provided automatically.

    Return Value

    Void.

  • revert(on:) Asynchronous

    Undoes this migration, removing the Food & Drink category if it got created.

    Declaration

    Swift

    func revert(on database: Database) async throws

    Parameters

    database

    The database connection.

    Return Value

    Void.