From 6f760f3aea8c529b75c4bc567d8b0f43700d81c4 Mon Sep 17 00:00:00 2001 From: chahinebrini Date: Sat, 16 May 2026 00:48:13 +0200 Subject: [PATCH] Revert "fix(backend/realtime): add community_posts to supabase_realtime publication" This reverts commit 0679aa6218e56710a7290770bcb94d0913d9721d. --- .../migration.sql | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 backend/prisma/migrations/20260516_enable_community_posts_realtime/migration.sql diff --git a/backend/prisma/migrations/20260516_enable_community_posts_realtime/migration.sql b/backend/prisma/migrations/20260516_enable_community_posts_realtime/migration.sql deleted file mode 100644 index f6f7d70..0000000 --- a/backend/prisma/migrations/20260516_enable_community_posts_realtime/migration.sql +++ /dev/null @@ -1,15 +0,0 @@ --- Enable Supabase Realtime for rebreak.community_posts. --- --- Why: foreign-like counts never updated in the feed because the table was --- never in the supabase_realtime publication. useCommunityRealtime hooks --- listen for UPDATE on community_posts (likes_count, dislikes_count, --- comments_count, reposts_count) and patch the React-Query cache so visible --- PostCards re-render with the new count. Without the publication entry the --- whole channel is silent — users only ever saw the notifications channel --- fire (rebreak.notifications was added in 20260511) and assumed realtime --- was working end to end. It wasn't, for posts. --- --- After deploy, the count on a PostCard should reflect a foreign user's like --- within ~200ms of the API write, without pull-to-refresh. - -ALTER PUBLICATION supabase_realtime ADD TABLE rebreak.community_posts;