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

average_cache_migration generates index name that is too long for Postgres #141

Open
yourtallness opened this issue Mar 1, 2017 · 1 comment

Comments

@yourtallness
Copy link

The following statement generates an index name upwards of 63 characters long which Postgres errors out on.

add_index :average_caches, [:rater_id, :rateable_id, :rateable_type]

I would recommend explicit naming of the index to avoid this issue.

@JIuc75Rus
Copy link

add_index :average_caches, [:rater_id, :rateable_id]
add_index :average_caches, [:rateable_type]

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

2 participants