You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @ohaddahan, thanks for the suggestion. I've experienced this as well (and sometimes used the same trick), but I don't want to make it the default recommendation. Sometimes, concurrent indexes fail to build and exist but are invalid. In this case, I think it's better to throw an error so developers can manually resolve the issue (most likely, drop the invalid index and run the migration again).
I recently used this gem to add concurrently an index on a large and busy table on Heroku.
The operation lost connection midway but the migration finished.
Seems like some parts of Rails book keeping failed and now I get failing new builds since it think the migration need to be done but the index exists.
I think that adding
unless index_exists?
to the recommendation will be useful for future similar issues others may have.The text was updated successfully, but these errors were encountered: