Supabase backend
Unesi URL i anon public key.
Koristi samo anon public key.
create extension if not exists pgcrypto;
create table if not exists public.deliveries (
id uuid primary key default gen_random_uuid(),
delivery_date date not null,
station smallint not null check (station between 1 and 5),
position integer not null default 0,
delivery_time text not null default '07:00',
customer text not null default '',
address text not null default '',
city text not null default '',
contact text not null default '',
vehicle text not null default '',
status text not null default 'Čeka',
note text not null default '',
document text not null default '',
created_at timestamptz not null default now(),
updated_at timestamptz not null default now()
);
alter table public.deliveries enable row level security;
create policy "public read" on public.deliveries for select to anon using (true);
create policy "public insert" on public.deliveries for insert to anon with check (true);
create policy "public update" on public.deliveries for update to anon using (true) with check (true);
create policy "public delete" on public.deliveries for delete to anon using (true);
alter publication supabase_realtime add table public.deliveries;