export const backfillAggregatesMigration = migrations.define({
table: "socialPostComments",
customRange: (q) => q.withIndex("unreadStatus", (q) => q.eq("isRead", false)),
migrateOne: async (ctx, doc) => {
await unreadCommentCountByStatusTable.insertIfDoesNotExist(ctx, doc);
await unreadCommentCountByAssignedToTable.insertIfDoesNotExist(ctx, doc);
await unreadCommentCountByAccountTable.insertIfDoesNotExist(ctx, doc);
},
});
export const backfillAggregatesMigration = migrations.define({
table: "socialPostComments",
customRange: (q) => q.withIndex("unreadStatus", (q) => q.eq("isRead", false)),
migrateOne: async (ctx, doc) => {
await unreadCommentCountByStatusTable.insertIfDoesNotExist(ctx, doc);
await unreadCommentCountByAssignedToTable.insertIfDoesNotExist(ctx, doc);
await unreadCommentCountByAccountTable.insertIfDoesNotExist(ctx, doc);
},
});