问题
How to get SHARED_DATABASE_URL in heroku.. while am trying to migrate it is asking for SHARED_DATABASE_URL how can i get it.. ??
heroku pg:reset --db SHARED_DATABASE_URL
What should i add in the place of SHARED_DATABASE_URL?? am working in ruby on rails
could anyone help me on this.
回答1:
You can use command: heroku pg:info or just heroku pg to get information about your database. You will get something like this:
HEROKU_POSTGRESQL_GRAY_URL (DATABASE_URL)
Then run: heroku pg:reset HEROKU_POSTGRESQL_GRAY_URL
to reset database on heroku.
回答2:
The instruction below worked for me :
$ heroku pg:credentials YOUR_DATABASE_NAME
It returns the informations ( url, port, dbname, user, password ) :
Connection info string:
"dbname=xxxxxxx host=dc2-103-73-245-224.shhdtdr-1.amazonaws.com port=6212 user=user31231 password=dyzjur sslmode=require"
来源:https://stackoverflow.com/questions/13347737/how-to-get-shared-database-url-in-heroku