create table if not exists public.messages (
id bigint generated by default as identity primary key,
created_at timestamp with time zone default timezone('utc'::text, now()) not null,
username text not null,
content text not null,
avatar_color text default '#10b981'
);
alter table public.messages enable row level security;
create policy "Public Read Access" on public.messages for select using (true);
create policy "Public Insert Access" on public.messages for insert with check (true);
alter publication supabase_realtime add table public.messages;