Back to the lesson

Original working file

schema.sql

Code and working example pages keep their original identifiers and sample text. The lesson and file guidance explain them in your language.

create table public.feedback (
 id uuid primary key default gen_random_uuid(),
 message text not null check (char_length(message) between 1 and 1000),
 created_at timestamptz not null default now()
);
alter table public.feedback enable row level security;
revoke all on public.feedback from anon, authenticated;
grant insert on public.feedback to service_role;
-- No browser read/write policies: the practice server uses its secret key.