CreateCategories

struct CreateCategories : AsyncMigration

A Migration that creates an initial set of categories for Forums.

  • Declaration

    Swift

    struct CategoryCreateInfo
  • prepare(on:) Asynchronous

    Required by Migration protocol. Creates an initial set of categories for forums.

    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, deleting all categories.

    Declaration

    Swift

    func revert(on database: Database) async throws

    Parameters

    conn

    The database connection.

    Return Value

    Void.