mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 09:50:01 +00:00
183fe0a93c
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
27 lines
1.0 KiB
SQL
27 lines
1.0 KiB
SQL
|
|
CREATE TABLE public.board_members (
|
|
id UUID NOT NULL DEFAULT gen_random_uuid() PRIMARY KEY,
|
|
association_id UUID REFERENCES public.associations(id) ON DELETE CASCADE NOT NULL,
|
|
member_name TEXT NOT NULL,
|
|
member_email TEXT,
|
|
phone TEXT,
|
|
role TEXT DEFAULT 'Member',
|
|
approval_authority BOOLEAN NOT NULL DEFAULT false,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
|
);
|
|
|
|
ALTER TABLE public.board_members ENABLE ROW LEVEL SECURITY;
|
|
|
|
CREATE POLICY "Authenticated users can view board_members"
|
|
ON public.board_members FOR SELECT TO authenticated USING (true);
|
|
|
|
CREATE POLICY "Authenticated users can insert board_members"
|
|
ON public.board_members FOR INSERT TO authenticated WITH CHECK (true);
|
|
|
|
CREATE POLICY "Authenticated users can update board_members"
|
|
ON public.board_members FOR UPDATE TO authenticated USING (true) WITH CHECK (true);
|
|
|
|
CREATE POLICY "Authenticated users can delete board_members"
|
|
ON public.board_members FOR DELETE TO authenticated USING (true);
|