set unique to scanid in scan_analyses.
set unique to scanid in scan_analyses.