Join GitHub today
Expand the caveat about models in migrations in the rails guide. #7050
This is an attempt to address issue #6939, where an earlier migration
When both migrations were run together with
Running the migrations separately fixed this, as a new connection was
Good point. Ok, I've tried to expand it at the bottom of the existing section. I initially went overboard with code examples, but I think that it's not important enough to warrant a huge section for itself, I just want to make the point that using models is iffy and can lead to subtle and complicated problems, and that this should be handled with care.
I'd be happy to tweak further if you have any good ideas.