Add ACMCC app source, Supabase backend, and project config

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-01 20:19:26 -04:00
parent 313b51b412
commit 183fe0a93c
1422 changed files with 259271 additions and 0 deletions
@@ -0,0 +1,30 @@
-- Add missing columns to violations table for full violation management
ALTER TABLE public.violations ADD COLUMN IF NOT EXISTS stage text;
ALTER TABLE public.violations ADD COLUMN IF NOT EXISTS photo_url text;
ALTER TABLE public.violations ADD COLUMN IF NOT EXISTS photo_urls jsonb;
ALTER TABLE public.violations ADD COLUMN IF NOT EXISTS notice_level text;
ALTER TABLE public.violations ADD COLUMN IF NOT EXISTS notice_history jsonb;
ALTER TABLE public.violations ADD COLUMN IF NOT EXISTS timeline_entries jsonb;
ALTER TABLE public.violations ADD COLUMN IF NOT EXISTS assigned_to uuid;
-- Add missing columns to violation_types table
ALTER TABLE public.violation_types ADD COLUMN IF NOT EXISTS article_section text;
ALTER TABLE public.violation_types ADD COLUMN IF NOT EXISTS citation text;
ALTER TABLE public.violation_types ADD COLUMN IF NOT EXISTS requested_action text;
-- Create violation-photos storage bucket
INSERT INTO storage.buckets (id, name, public) VALUES ('violation-photos', 'violation-photos', true)
ON CONFLICT (id) DO NOTHING;
-- Allow authenticated users to upload to violation-photos
CREATE POLICY "Authenticated users can upload violation photos" ON storage.objects
FOR INSERT TO authenticated WITH CHECK (bucket_id = 'violation-photos');
-- Allow public read access to violation photos
CREATE POLICY "Public read access for violation photos" ON storage.objects
FOR SELECT TO public USING (bucket_id = 'violation-photos');
-- Allow authenticated users to delete their violation photos
CREATE POLICY "Authenticated users can delete violation photos" ON storage.objects
FOR DELETE TO authenticated USING (bucket_id = 'violation-photos');