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>
25 lines
972 B
SQL
25 lines
972 B
SQL
|
|
CREATE TABLE public.association_faqs (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
association_id UUID NOT NULL REFERENCES public.associations(id) ON DELETE CASCADE,
|
|
question TEXT NOT NULL,
|
|
answer TEXT,
|
|
sort_order INT DEFAULT 0,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
|
);
|
|
|
|
ALTER TABLE public.association_faqs ENABLE ROW LEVEL SECURITY;
|
|
|
|
CREATE POLICY "Authenticated users can view association FAQs"
|
|
ON public.association_faqs FOR SELECT TO authenticated USING (true);
|
|
|
|
CREATE POLICY "Authenticated users can insert association FAQs"
|
|
ON public.association_faqs FOR INSERT TO authenticated WITH CHECK (true);
|
|
|
|
CREATE POLICY "Authenticated users can update association FAQs"
|
|
ON public.association_faqs FOR UPDATE TO authenticated USING (true) WITH CHECK (true);
|
|
|
|
CREATE POLICY "Authenticated users can delete association FAQs"
|
|
ON public.association_faqs FOR DELETE TO authenticated USING (true);
|