-- Ensure logical replication can publish deletes/updates for app_versions
-- by setting a replica identity. This is idempotent and safe to run
-- using the service_role key or from the Supabase SQL editor.

-- Set replica identity to FULL so deletes/updates include whole row
-- when no primary key is present.
ALTER TABLE public.app_versions REPLICA IDENTITY FULL;

-- Optional alternative: if you prefer a primary key instead of FULL,
-- run the following (only if version_code is guaranteed unique):
-- ALTER TABLE public.app_versions ADD CONSTRAINT app_versions_pkey PRIMARY KEY (version_code);
