feat: add automated PDF invoice generation and storage in Supabase
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
-- Create bucket for invoices
|
||||
INSERT INTO storage.buckets (id, name, public)
|
||||
VALUES ('invoices', 'invoices', true)
|
||||
ON CONFLICT (id) DO NOTHING;
|
||||
|
||||
-- Policies for invoices bucket
|
||||
-- Allow public access to invoices (simplified for this demo, usually should be restricted)
|
||||
CREATE POLICY "Public Access" ON storage.objects FOR SELECT USING (bucket_id = 'invoices');
|
||||
CREATE POLICY "Authenticated Upload" ON storage.objects FOR INSERT WITH CHECK (bucket_id = 'invoices' AND auth.role() = 'authenticated');
|
||||
Reference in New Issue
Block a user