diff --git a/backend/prisma/migrations/20260516_enable_chat_realtime/migration.sql b/backend/prisma/migrations/20260516_enable_chat_realtime/migration.sql new file mode 100644 index 0000000..26abc89 --- /dev/null +++ b/backend/prisma/migrations/20260516_enable_chat_realtime/migration.sql @@ -0,0 +1,8 @@ +-- Enable Supabase Realtime for direct_messages and chat_messages tables. +-- Fixes missing live delivery on the DM-Page: +-- rebreak.direct_messages and rebreak.chat_messages were not part of the +-- supabase_realtime publication, causing postgres_changes subscriptions +-- (INSERT events) to be silently dropped — messages only appeared after +-- manual refresh. +ALTER PUBLICATION supabase_realtime ADD TABLE rebreak.direct_messages; +ALTER PUBLICATION supabase_realtime ADD TABLE rebreak.chat_messages;