How to triage this MySQL duplicate entry error after running Rails migration?

Posted by keruilin on Stack Overflow See other posts from Stack Overflow or by keruilin
Published on 2010-06-02T15:51:52Z Indexed on 2010/06/02 15:54 UTC
Read the original article Hit count: 266

Filed under:
|
|
|

I get the following error when I try to run this migration:

==  AddUniquenessConstraintOnAwards: migrating ================================
-- add_index(:awards, [:badge_id, :game_week_id], {:unique=>true, :name=>:game_badge_index})
rake aborted!
An error has occurred, all later migrations canceled:

Mysql::Error: Duplicate entry '35-8192' for key 'game_badge_index': CREATE UNIQUE INDEX `game_badge_index` ON `awards` (`badge_id`, `game_week_id`)

Has anyone encountered? What's the error telling me? How did you troubleshoot it and ultimately fix it?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about ruby-on-rails