Skip to content
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

supabase db diff and supabase db pull not capturing RLS policies in views #2264

Closed
officialankan opened this issue May 10, 2024 · 4 comments
Closed

Comments

@officialankan
Copy link

Describe the bug
I love views with RLS to reduce complex queries. I also like local development. When combining the two I always have to manually add the RLS part when pushing or pulling migrations.

To Reproduce
Steps to reproduce the behavior:

  1. Create a view with RLS (security_invoker=true) remotely or localy.
  2. pull or push
  3. in the generated diff, the security_invoker is not always there (I have seen it sometime, but can't see why it won't show anymore)

Expected behavior
The full settings of the view should be diffed.

System information
bild

Much love! I really enjoy supabase.

@sweatybridge
Copy link
Contributor

Is this a duplicate of #792?

@officialankan
Copy link
Author

Is this a duplicate of #792?

Yes, it is...

@sweatybridge
Copy link
Contributor

Thanks for confirming. I will close this issue as a duplicate.

The fix requires updating the underlying diff tool from migra to pg-schema-diff. It will likely be addressed by this upstream PR when it's merged stripe/pg-schema-diff#132

@sweatybridge sweatybridge closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
@bplunkett-stripe
Copy link

bplunkett-stripe commented May 29, 2024

Thanks for confirming. I will close this issue as a duplicate.

The fix requires updating the underlying diff tool from migra to pg-schema-diff. It will likely be addressed by this upstream PR when it's merged stripe/pg-schema-diff#132

pg-schema-diff doesn't support views yet. So that will need to be implemented first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants