Migration refactoring
Let sql tell us if the data is unique
fixup! Migration refactoring
Merge pull request #3675 from edx/opaque-keys-migrate

Opaque keys migrate