mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 01:40:01 +00:00
183fe0a93c
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
22 lines
649 B
SQL
22 lines
649 B
SQL
|
|
CREATE TABLE public.custom_ledgers (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
name TEXT NOT NULL,
|
|
association_id UUID REFERENCES public.associations(id) ON DELETE SET NULL,
|
|
owner_id UUID REFERENCES public.owners(id) ON DELETE SET NULL,
|
|
rows JSONB DEFAULT '[]'::jsonb,
|
|
settings JSONB DEFAULT '{}'::jsonb,
|
|
created_by UUID,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
|
);
|
|
|
|
ALTER TABLE public.custom_ledgers ENABLE ROW LEVEL SECURITY;
|
|
|
|
CREATE POLICY "Authenticated users can manage custom_ledgers"
|
|
ON public.custom_ledgers
|
|
FOR ALL
|
|
TO authenticated
|
|
USING (true)
|
|
WITH CHECK (true);
|