ven v
09/29/2022, 6:12 PMcreate table todos (
id bigint generated by default as identity primary key,
user_id uuid references auth.users not null,
task text check (char_length(task) > 3),
is_complete boolean default false,
inserted_at timestamp with time zone default timezone('utc'::text, now()) not null
);
alter table todos enable row level security;
create policy "Individuals can create todos." on todos for
insert with check (auth.uid() = user_id);
create policy "Individuals can view their own todos. " on todos for
select using (auth.uid() = user_id);
create policy "Individuals can update their own todos." on todos for
update using (auth.uid() = user_id);
create policy "Individuals can delete their own todos." on todos for
delete using (auth.uid() = user_id);
something like this, how to do in prisma?Austin
09/29/2022, 10:23 PMven v
09/30/2022, 10:14 AMAustin
09/30/2022, 8:08 PMschema.prisma
, but it shouldn’t affect any rules that you already have defined in the database.