Initial commit DBMaker - Oficiais e Funcionando

This commit is contained in:
Marcos
2026-03-22 17:12:45 -03:00
commit 9cee4943f8
144 changed files with 31465 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
-- Criar bucket para documentos
INSERT INTO storage.buckets (id, name, public)
VALUES ('documentos', 'documentos', true)
ON CONFLICT (id) DO NOTHING;
-- Permitir upload de arquivos (política pública para desenvolvimento)
CREATE POLICY "Permitir upload público" ON storage.objects
FOR INSERT WITH CHECK (bucket_id = 'documentos');
CREATE POLICY "Permitir leitura pública" ON storage.objects
FOR SELECT USING (bucket_id = 'documentos');
CREATE POLICY "Permitir delete público" ON storage.objects
FOR DELETE USING (bucket_id = 'documentos');
CREATE POLICY "Permitir update público" ON storage.objects
FOR UPDATE USING (bucket_id = 'documentos');