I have to add a unique constraint to a field after the table was created. I therefore set up a migration file with this in the up() method:
up()