-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(realtime): enable realtime publication for signature requests #242
Conversation
- important note: subscribing to a table that doesn't have realtime publications enabled, disables subscriptions to all tables 🥴
Coverage Report
File CoverageNo changed files found. |
@Jipperism to your point on checking for publications. Why not enable them for all tables? https://supabase.com/docs/guides/database/replication#create-a-publication |
@bitbeckers interesting idea. Not 100% sure if that would solve the problem, we'd have to verify if that is for all tables at the time the migration is run, or all tables from now on. If so, yeah why not? |
Looks like we can drop the publication and recreate it for all tables in a single migration: https://supabase.com/docs/guides/database/replication#recreate-a-publication |
Yes, but that would then have to be added to every migration that creates a new table, right? |
Yes. Would a solution be to run a GHA after the migration that gets all entries from publication table and a list of all tables and finds the diff? |
@bitbeckers is the idea that it then errors if not all tables are in the publication? Or it then creates a migration where we add all missing tables to the realtime publication? Different approach: wrapper method for subscribing that checks the table being subscribed to against all tables in the realtime publication. That would solve the problem at startup time, so you'd see it before pushing. I think both would be fine, the wrapper method would keep the migrations cleaner. |
@Jipperism for the rest of the discussion, let's not get bikeshed here: #246 edit: sorry I though I already approved |
Introduced in 70c8131. I think it would be good if we can find a way to double check at runtime whether all tables that are being subscribed to have realtime publications enabled.