Files
acmcc/supabase/migrations/20260331153646_f050e89a-7fc9-41e7-85a6-e42bea7a102a.sql
2026-06-01 20:19:26 -04:00

21 lines
689 B
SQL

CREATE TABLE public.buildium_gl_mappings (
id UUID NOT NULL DEFAULT gen_random_uuid() PRIMARY KEY,
association_id UUID NOT NULL REFERENCES public.associations(id) ON DELETE CASCADE,
charge_type TEXT NOT NULL,
buildium_gl_account_id TEXT NOT NULL,
buildium_gl_account_name TEXT,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(),
UNIQUE(association_id, charge_type)
);
ALTER TABLE public.buildium_gl_mappings ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Authenticated users can manage buildium GL mappings"
ON public.buildium_gl_mappings
FOR ALL
TO authenticated
USING (true)
WITH CHECK (true);