database - Heroku pg :push command missing

标签 database heroku

我尝试通过执行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/

相关文章:

java - JPA 查询 - 如何获得特定的结果集?

mysql - 基于主表更新从属表

ruby-on-rails - 更新 Heroku Buildpack 以使用 ffmpegthumbnailer 2.2.0

python - 无法决定是使用 autoenv 还是 python dotenv

javascript - 如何在 Heroku 上记录错误

amazon-web-services - 将 Heroku SSL (ACM) 与 AWS S3/Cloudfront 一起使用

database - 如何将数学表达式/解释存储到数据库中

c# - 更新查询不更新数据库中的任何内容

mysql - 优化很少使用的 varchar 字段

sql - Heroku PostgreSQL 按字母顺序排列