Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration fails for 5.1(.7?) #16

Open
nfstern opened this issue May 10, 2020 · 0 comments
Open

Migration fails for 5.1(.7?) #16

nfstern opened this issue May 10, 2020 · 0 comments

Comments

@nfstern
Copy link

nfstern commented May 10, 2020

Actually, I fixed it manually, but the maintainer of the gem may like to look into this.
in the eav_migration.rb, add
[<%= ActiveRecord::Migration.current_version %>]
to the end of line 1

Remove line 13 (if the current_version is 5.x or greater?) which is causing a duplicate index issue. Rails 5.1(.7?) is creating the index as part of the relationship with a name. The same name gets used for line 14 which causes a duplicate index name issue and the migration to fail.

  1. add_index :<%= table_name %>, :<%= model_association_name %>_id
  2. add_index :<%= table_name %>, :entry_key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant