我尝试通过执行heroku db:push
将我的数据库推送到heroku,这给了我以下错误:
! db:push and db:pull have been removed and replaced with pg:push and pg:pull.
! For more information, please see:
! devcenter.heroku.com/articles/heroku-postgresql#pg-push-and-pg-pull
所以我尝试了 heroku pg:push
这给了我这个错误:
! `pg:push` is not a heroku command.
! Perhaps you meant `db:push` or `pg:ps`.
和 heroku help pg
给出
pg:credentials DATABASE # Display the DATABASE credentials.
pg:info [DATABASE] # Display database information
pg:promote DATABASE # Sets DATABASE as your DATABASE_URL
pg:psql [DATABASE] # Open a psql shell to the database
pg:reset DATABASE # Delete all data in DATABASE
pg:unfollow REPLICA # stop a replica from following and make it a read/write database
pg:wait [DATABASE] # monitor database creation, exit when complete
我的应用程序位于 cedar 堆栈上,这是我正在使用的完整命令:
heroku pg:push my_local_name HEROKU_POSTGRESQL_CHARCOAL --app my_app_name
还尝试了添加 pgbackups
的建议,但我仍然遇到相同的错误。
最佳答案
我发现,我正在使用heroku gem(在ruby 1.9上),当我去查看1.9和2.0上的gem是否有区别时,我看到了弃用通知。现在,这可以按照 heroku-toolbelt 的预期工作。安装并移除 gem 。
关于database - Heroku pg :push command missing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21787107/