Richard L. wrote:
Along with what has already been mentioned:
“Don’t use your ActiveRecord models in your migrations or your life will
Thanks, I appreciate this and I too discovered that if I use the parent
class, I can get away with it.
I am writing a one-time series of migrations of a production database to
a new railsified schema so my model is evolving together with the
migrations and it helps me a lot to go back and re-run the series of
migrations constantly as I define the models. I certainly understand
the long term problem of keeping migrations around that use obselete
models but once I am in production, I will never need these migrations
again and will probably restart the migration counter at 0.
Thanks again for the tips! After cutover, I certainly will include any
required model defs in my migrations.