-- Cloud build preview/package metadata required by the public beta worker flow.

alter table public.pet_builds
  add column if not exists preview_ref text,
  add column if not exists allowed_actions jsonb not null default '["idle","sleep","walk","look","sit","tail_wag"]'::jsonb,
  add column if not exists checksum_valid boolean not null default true,
  add column if not exists runtime_compatible boolean not null default true;

grant select, insert, update on table public.pet_builds to service_role;
grant select, insert, update on table public.pet_packages to service_role;
