-- Client accept/reject votes, one per (link, photo) — a separate axis from
-- the 1-5 star rating so a photo can be e.g. accepted but unrated.
create table verdicts (
    share_id uuid not null references shares(id) on delete cascade,
    photo_id uuid not null references photos(id) on delete cascade,
    verdict text not null check (verdict in ('accept', 'reject')),
    updated_at timestamptz not null default now(),
    primary key (share_id, photo_id)
);

-- Cascaded photo deletes fire per-row FK triggers; without this each one
-- sequential-scans the table.
create index verdicts_photo_idx on verdicts (photo_id);
