Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/53.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 如何获取heroku中上次迁移运行的次数?_Ruby On Rails_Postgresql_Heroku - Fatal编程技术网

Ruby on rails 如何获取heroku中上次迁移运行的次数?

Ruby on rails 如何获取heroku中上次迁移运行的次数?,ruby-on-rails,postgresql,heroku,Ruby On Rails,Postgresql,Heroku,我试图在heroku上调试我的应用程序,但似乎有一个或多个迁移没有运行。在不手动完成每次迁移的情况下,我试图找出上次运行的迁移 环境:rails,postgresql,来自终端: heroku pg:psql --app app_name db_name select * from schema_migrations; 查找最后一个条目 另一种方式。。。从终点站 heroku run console --app app_name class SchemaMigration<Ac

我试图在heroku上调试我的应用程序,但似乎有一个或多个迁移没有运行。在不手动完成每次迁移的情况下,我试图找出上次运行的迁移

环境:rails,postgresql,来自终端:

 heroku pg:psql --app app_name db_name
 select * from schema_migrations; 
查找最后一个条目

另一种方式。。。从终点站

 heroku run console --app app_name
 class SchemaMigration<ActiveRecord::Base
 end 
 SchemaMigration.last