CREATE UNIQUE INDEX IF NOT EXISTS idx_candidate_profile_image_unique ON app.candidate_document (candidate_id) WHERE category = 'profile_image';