Sms Rehber eklemesi,Mobil uyumluluk ayarları,iletişim sayfası düzenlemeler vb.
This commit is contained in:
5
migrations/add_product_code.sql
Normal file
5
migrations/add_product_code.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Add product_code to products table
|
||||
ALTER TABLE public.products ADD COLUMN IF NOT EXISTS product_code TEXT;
|
||||
|
||||
-- Create an index for faster lookups if needed (optional but good practice)
|
||||
-- CREATE INDEX IF NOT EXISTS idx_products_product_code ON public.products(product_code);
|
||||
14
migrations/add_sms_templates.sql
Normal file
14
migrations/add_sms_templates.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- SMS TEMPLATES
|
||||
CREATE TABLE IF NOT EXISTS public.sms_templates (
|
||||
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
|
||||
title TEXT NOT NULL,
|
||||
message TEXT NOT NULL,
|
||||
created_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc'::text, now()) NOT NULL
|
||||
);
|
||||
|
||||
-- RLS Policies for SMS Templates
|
||||
ALTER TABLE public.sms_templates ENABLE ROW LEVEL SECURITY;
|
||||
|
||||
CREATE POLICY "Admins can full access sms templates" ON public.sms_templates USING (
|
||||
EXISTS (SELECT 1 FROM public.profiles WHERE profiles.id = auth.uid() AND profiles.role = 'admin')
|
||||
);
|
||||
Reference in New Issue
Block a user