Reputation: 96614
I get this when trying to run the migration:
Mysql2::Error: Duplicate entry 'repeat' for key 'index_industries_on_name':
CREATE UNIQUE INDEX `index_industries_on_name` ON `industries` (`name`)
Migration is add_index :industries, :name, {:unique => true}
Upvotes: 2
Views: 178
Reputation: 75035
You have two or more rows with "repeat"
as the industry name. You cannot make the name
column of your industries
table unique until you fix this.
Upvotes: 3