Hello! I try to make automatic migrations directly from ruby script without using rake and console commands. But I can't retrieve current database schema version. I have tried to use ActiveRecord::Migration.version and @version property in a child of ActiveRecord::Migration. The result was nil at both cases. How can I do this? Thank you.
on 2012-11-10 21:05
on 2012-11-10 21:28
I have found the solution, but only by looking source code of activerecord gem. It's simple :) ActiveRecord::Migrator.current_version