How to change DATABASE_URL for a heroku application

后端 未结 7 1773
醉话见心
醉话见心 2020-12-09 15:32

I wanted to use an external Database with my heroku application. But I\'m unable to edit the configuration cariables. I tried using GUI, Which says, Cannot overwrite attachm

7条回答
  •  爱一瞬间的悲伤
    2020-12-09 15:55

    After trying out most these answers, I came across an update in 2016, here: the database needs to be detached first, then update the variable of the DATABASE_URL.

    heroku addons:attach heroku-postgresql -a  --as HEROKU_DATABASE
    heroku addons:detach DATABASE -a 
    heroku config:add DATABASE_URL=
    

提交回复
热议问题