Upgrade the migration to prevent duplicates

Closes #1048

Merge request reports

Loading