使用rake db:migrate:status
我可以显示迁移的状态,但显示最新执行的方式是什么?
答案 0 :(得分:1)
此处已在Stack Overflow上回答:https://stackoverflow.com/a/8847126/4461194
1.9.3-p551 :001 > ActiveRecord::Migrator.current_version
(0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
=> 20150114073202