MigratePostLikesToReactions
struct MigratePostLikesToReactions : AsyncMigration
Converts legacy forum likes into reaction rows using the legacy routes’ exact emoji strings.
-
prepare(on:Asynchronous) Original like times are unknown, so every converted row shares one date; each post’s chip gets one group identifier, derived deterministically because a volatile function is re-evaluated for every row.
Declaration
Swift
func prepare(on database: Database) async throws -
revert(on:Asynchronous) Declaration
Swift
func revert(on database: Database) async throws
View on GitHub