-- Migration V5: Update unique constraint on risks to include remark
ALTER TABLE public.risks 
DROP CONSTRAINT IF EXISTS risks_risk_content_legal_basis_document_no_summary_key;

ALTER TABLE public.risks
ADD CONSTRAINT risks_full_key UNIQUE (risk_content, legal_basis, document_no, summary, remark);
