We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 push
Describe the bug My local DB has an RLS policy that I am not being able to push to the remote DB with supabase db push
To Reproduce
These are my local RLS policies (as confirmed with supabase studio GUI and the SQL editor)
[ { "schemaname": "public", "tablename": "users", "policyname": "Enable insert for authenticated users only", "permissive": "PERMISSIVE", "roles": "{authenticated}", "cmd": "INSERT", "qual": null, "with_check": "true" }, { "schemaname": "public", "tablename": "users", "policyname": "Enable read access for all users", "permissive": "PERMISSIVE", "roles": "{public}", "cmd": "SELECT", "qual": "true", "with_check": null }, { "schemaname": "public", "tablename": "users", "policyname": "Enable update for users based on email", "permissive": "PERMISSIVE", "roles": "{public}", "cmd": "UPDATE", "qual": "((( SELECT auth.jwt() AS jwt) ->> 'email'::text) = email)", "with_check": "((( SELECT auth.jwt() AS jwt) ->> 'email'::text) = email)" }, { "schemaname": "public", "tablename": "users", "policyname": "Update user table", "permissive": "PERMISSIVE", "roles": "{anon}", "cmd": "UPDATE", "qual": "true", "with_check": "true" } ]
These are the policies on the remote DB before and after running supabase db push --linked --include-all
supabase db push --linked --include-all
[ { "schemaname": "public", "tablename": "users", "policyname": "Enable update for users based on email", "permissive": "PERMISSIVE", "roles": "{public}", "cmd": "UPDATE", "qual": "((( SELECT auth.jwt() AS jwt) ->> 'email'::text) = email)", "with_check": "((( SELECT auth.jwt() AS jwt) ->> 'email'::text) = email)" }, { "schemaname": "public", "tablename": "users", "policyname": "Enable read access for all users", "permissive": "PERMISSIVE", "roles": "{public}", "cmd": "SELECT", "qual": "true", "with_check": null }, { "schemaname": "public", "tablename": "users", "policyname": "Enable insert for authenticated users only", "permissive": "PERMISSIVE", "roles": "{authenticated}", "cmd": "INSERT", "qual": null, "with_check": "true" } ]
Expected behavior Expecting local and remote to have the same RLS policies.
If applicable, add screenshots to help explain your problem.
Additional context If applicable, add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Can you run supabase db diff -f add_policy locally to see if any new migration is generated?
supabase db diff -f add_policy
I suspect you are missing a policing in your existing migration files.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
My local DB has an RLS policy that I am not being able to push to the remote DB with
supabase db push
To Reproduce
These are my local RLS policies (as confirmed with supabase studio GUI and the SQL editor)
These are the policies on the remote DB before and after running
supabase db push --linked --include-all
Expected behavior
Expecting local and remote to have the same RLS policies.
If applicable, add screenshots to help explain your problem.
Additional context
If applicable, add any other context about the problem here.
The text was updated successfully, but these errors were encountered: