Rails 4 adds an index automatically for a references attribute, so only add the explicit index when the ActiveRecord version is less than 4.
Merge pull request #44 from petergoldstein/hotfix/fix_migration_bug

Rails 4 migration includes duplicate index creation