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,22 @@
-- Create violation_types table for configurable violation categories per association
CREATE TABLE IF NOT EXISTS public.violation_types (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
association_id uuid REFERENCES public.associations(id) ON DELETE CASCADE NOT NULL,
category text NOT NULL,
description text,
created_at timestamptz DEFAULT now(),
updated_at timestamptz DEFAULT now()
);
ALTER TABLE public.violation_types ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Authenticated users can manage violation_types"
ON public.violation_types FOR ALL TO authenticated USING (true) WITH CHECK (true);
-- Add missing columns to violations for inspection workflow
ALTER TABLE public.violations ADD COLUMN IF NOT EXISTS address text;
ALTER TABLE public.violations ADD COLUMN IF NOT EXISTS violation_type text;
ALTER TABLE public.violations ADD COLUMN IF NOT EXISTS violation_date date DEFAULT CURRENT_DATE;
ALTER TABLE public.violations ADD COLUMN IF NOT EXISTS notes text;
ALTER TABLE public.violations ADD COLUMN IF NOT EXISTS property_id uuid;