Duplicates are possible
Add unique index for container_repository_registry.container_repository_id
container_repository_registry.container_repository_id
The migration should include the removal of duplicates first.