this repo has no description
at main 21 lines 1.2 kB view raw
1CREATE SCHEMA IF NOT EXISTS tes; 2 -- Grant schema usage to all roles 3GRANT USAGE ON SCHEMA tes TO anon, authenticated, service_role; 4-- For existing tables: full access to service_role, read-only to others 5GRANT ALL ON ALL TABLES IN SCHEMA tes TO service_role; 6GRANT SELECT ON ALL TABLES IN SCHEMA tes TO anon, authenticated; 7-- For existing routines: full access to service_role only 8GRANT ALL ON ALL ROUTINES IN SCHEMA tes TO service_role; 9-- For existing sequences: full access to service_role only 10GRANT ALL ON ALL SEQUENCES IN SCHEMA tes TO service_role; 11-- For future tables: full access to service_role, read-only to others 12ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA tes 13 GRANT ALL ON TABLES TO service_role; 14ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA tes 15 GRANT SELECT ON TABLES TO anon, authenticated; 16-- For future routines: full access to service_role only 17ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA tes 18 GRANT ALL ON ROUTINES TO service_role; 19-- For future sequences: full access to service_role only 20ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA tes 21 GRANT ALL ON SEQUENCES TO service_role;