Corrección 1 — Delete de proceso restaurado +
This commit is contained in:
16
supabase/migrations/005_create_resources.sql
Normal file
16
supabase/migrations/005_create_resources.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
CREATE TABLE IF NOT EXISTS public.resources (
|
||||
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
name text NOT NULL,
|
||||
type text NOT NULL CHECK (type IN ('role','person','system','equipment','supply')),
|
||||
cost_per_hour numeric NOT NULL DEFAULT 0,
|
||||
created_by uuid REFERENCES public.users(id),
|
||||
updated_by uuid REFERENCES public.users(id),
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
updated_at timestamptz NOT NULL DEFAULT now()
|
||||
);
|
||||
|
||||
ALTER TABLE public.resources ENABLE ROW LEVEL SECURITY;
|
||||
|
||||
CREATE POLICY "all_resources" ON public.resources
|
||||
FOR ALL USING (auth.uid() IS NOT NULL)
|
||||
WITH CHECK (auth.uid() IS NOT NULL);
|
||||
Reference in New Issue
Block a user