Corrigindo conexão para o schema gpi no Supabase

This commit is contained in:
2026-04-03 15:56:46 +00:00
parent 4404f3f470
commit fc22afa07d
4 changed files with 286 additions and 3 deletions

13
enable_gpi_schema.sql Normal file
View File

@@ -0,0 +1,13 @@
-- Habilitar schema gpi na PostgREST API
-- As permissões abaixo são suficientes para a PostgREST expor o schema
-- Permissões
GRANT USAGE ON SCHEMA gpi TO postgres, anon, authenticated, service_role;
-- Grant em todas as tabelas existentes do schema gpi
GRANT ALL ON ALL TABLES IN SCHEMA gpi TO postgres, anon, authenticated, service_role;
-- Grant em sequências
GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA gpi TO postgres, anon, authenticated, service_role;
SELECT 'Schema gpi habilitado na PostgREST API!' AS result;