Tip for altering index in a migration

This one was a ‘well duh!’ moment for me, but if you’re going to run a


call in a migration that involves adding a uniquely keyed index to a table that’s potentially already populated, be sure to run


first. ;)

Alternately, manually ensure you have no data that would cause a key conflict already in the table…