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

fix schema, table permissions #1946

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions supabase/migrations/20241205095428_migrate_to_private_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
DROP EXTENSION pg_graphql;

-- CREATE SCHEMA PRIVATE
create schema if not exists private;
grant usage on schema private to authenticated, service_role;
CREATE SCHEMA if NOT EXISTS PRIVATE;
GRANT USAGE ON SCHEMA private TO authenticated, service_role;
GRANT ALL ON ALL TABLES IN SCHEMA private TO authenticated, service_role;
GRANT ALL ON ALL ROUTINES IN SCHEMA private TO authenticated, service_role;
GRANT ALL ON ALL SEQUENCES IN SCHEMA private TO authenticated, service_role;
ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA private GRANT ALL ON TABLES TO authenticated, service_role;
ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA private GRANT ALL ON ROUTINES TO authenticated, service_role;
ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA private GRANT ALL ON SEQUENCES TO authenticated, service_role;

-- DROP TABLE TRIGGERS
DROP TRIGGER on_auth_user_created ON auth.users;
Expand Down
Loading