SetInitialCategoryForumCounts

struct SetInitialCategoryForumCounts : AsyncMigration

A Migration that initializes the ForumCount field in each category. This migration should run after all the migrations that generate forum threads.

  • prepare(on:) Asynchronous

    Initializes the cached forumCount value in each 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

    Declaration

    Swift

    func revert(on database: Database) async throws