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
forumCountvalue in each category.Declaration
Swift
func prepare(on database: Database) async throwsParameters
databaseA connection to the database, provided automatically.
Return Value
Void.
-
revert(on:Asynchronous) Declaration
Swift
func revert(on database: Database) async throws
View on GitHub