create table if not exists repo_star ( id bigserial primary key, repo_uuid uuid not null, user_uuid uuid not null, created_at timestamp with time zone not null, unique (repo_uuid, user_uuid) ); create unique index if not exists idx_repo_star_repo_user on repo_star (repo_uuid, user_uuid);