-- # Put the your SQL below migration seperator.
-- !UP

create table if not exists bot_feedbacks (
  id bigint generated by default as identity primary key,
  bot_id text not null,
  telegram_id text not null,
  message text not null,
  created_at timestamp with time zone not null default now()
);

alter table bot_feedbacks enable row level security;

create policy "everyone can view bot feedbacks." on bot_feedbacks
for select using (true);

create policy "anyone can insert on bot feedbacks." on bot_feedbacks
for insert with check (true);

create policy "anyone can update on bot feedbacks." on bot_feedbacks
for update using (true);

-- !DOWN

drop policy if exists "anyone can update on bot feedbacks." on bot_feedbacks;
drop policy if exists "anyone can insert on bot feedbacks." on bot_feedbacks;
drop policy if exists "everyone can view job applicant wishlists." on bot_feedbacks;
