Heroku不会重置我的数据库 [英] Heroku won't reset my database

查看:121
本文介绍了Heroku不会重置我的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试从命令行运行 $ heroku pg:reset ,但我相信我没有正确放入数据库。我试过了一些变化。



我执行 $ heroku config | grep POSTGRESQL 以获取打印为

的数据库名称

  HEROKU_POSTGRESQL_PINK_URL:postgres:// naknaswvxfvuup:QK2dHYNMZ_va10lDgMDo4S0BIM @ ec2- 23-21-161-255.compute-1.amazonaws.com:5432/db7eute4gu4mcb 


我试过运行一切从


#1

  $ heroku pg:reset HEROKU_POSTGRESQL_PINK_URL:postgres:// naknaswvxfvuup:QK2dHYNMZ_va10lDgMDo4S0BIM@ec2-23-21-161-255.compute-1.amazonaws.com:5432 / db7eute4gu4mcb 




#2

  $ heroku pg reset postgres:// naknaswvxfvuup:QK2dHYNMZ_va10lDgMDo4S0BIM@ec2-23-21-161-255.compute-1.amazonaws.com:5432 / db7eute4gu4mcb 


#3


$ b b

  $ heroku pg:reset db7eute4gu4mcb 

和其他变体。请让我知道如何正确地注意这一点,因为我一直收到一个错误或这个文本从命令行!未知的数据库:db7eute4gu4mcb。有效的选项是:DATABASE_URL,HEROKU_POSTGRESQL_PINK_URL




我现在在Ruby on Rails教程10.4。谢谢!

解决方案

运行时应指定一个DATABASE heroku pg:reset 。这是语法:

  heroku pg:reset< DATABASE> 

要知道它的值,您可以运行:

  heroku pg:info 

会返回DATABASE_URL ,例如: HEROKU_POSTGRESQL_GRAY_URL

然后您可以重置数据库:

  heroku pg:reset HEROKU_POSTGRESQL_GRAY_URL 

在您的情况下,要重置数据库运行:

  heroku pg:reset HEROKU_POSTGRESQL_PINK_URL 


I have been trying to run $ heroku pg:reset from the command line but I believe I'm not putting in the database correctly. I've tried a number of variations.

I ran $ heroku config | grep POSTGRESQL to get the database name which prints as

HEROKU_POSTGRESQL_PINK_URL: postgres://naknaswvxfvuup:QK2dHYNMZ_va10lDgMDo4S0BIM@ec2-23-21-161-255.compute-1.amazonaws.com:5432/db7eute4gu4mcb

I've tried running everything from

#1

$ heroku pg:reset HEROKU_POSTGRESQL_PINK_URL: postgres://naknaswvxfvuup:QK2dHYNMZ_va10lDgMDo4S0BIM@ec2-23-21-161-255.compute-1.amazonaws.com:5432/db7eute4gu4mcb

#2

$ heroku pg reset postgres://naknaswvxfvuup:QK2dHYNMZ_va10lDgMDo4S0BIM@ec2-23-21-161-255.compute-1.amazonaws.com:5432/db7eute4gu4mcb

#3

$ heroku pg:reset db7eute4gu4mcb

and other variations. Please let me know how to correctly note this as I keep getting either an error or this text from the commmand line " ! Unknown database: db7eute4gu4mcb. Valid options are: DATABASE_URL, HEROKU_POSTGRESQL_PINK_URL"

I'm currently at 10.4 on the Ruby on Rails tutorial. Thanks!

解决方案

You should specify a DATABASE when run heroku pg:reset. This is the syntax:

heroku pg:reset <DATABASE>

To know the value of , you can run:

heroku pg:info

It will return DATABASE_URL, something like: HEROKU_POSTGRESQL_GRAY_URL
Then you can reset your database:

heroku pg:reset HEROKU_POSTGRESQL_GRAY_URL

In your case, to reset database run:

heroku pg:reset HEROKU_POSTGRESQL_PINK_URL

这篇关于Heroku不会重置我的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆