[英]Postgres dev db not uploading to Heroku with pg:transfer
I'm trying to clone my development postgres db to Heroku with the command: 我正在尝试使用以下命令将我的开发postgres db克隆到Heroku:
heroku pg:transfer -t postgres://localhost/MentorConnect_development -f postgres://mbarwrandompn:DaVXj1_AVytIgLU3lsyEKjU8eC@ec2-23-21-129-229.compute-1.amazonaws.com:5432/d4ahirandom
(changed the url for privacy) (已更改网址以保护隐私)
It seems to work -- I get a lot of lines going with my database columns and everything with no errors. 似乎可行-我的数据库列和很多行都没有错误。 However when I go into the Heroku rails console, the database is empty. 但是,当我进入Heroku Rails控制台时,数据库为空。 What am I doing wrong? 我究竟做错了什么?
Your command there is transferring from Heroku to localhost, not development > heroku as per your question. 根据您的问题,您的命令从Heroku转移到localhost,而不是development> heroku。
Also, it's much easier to use the colour of the database rather than the full URL (get it from heroku config
output) eg; 另外,使用数据库的颜色而不是使用完整的URL(从heroku config
输出中获取)更容易。
heroku pg:transfer -f postgres://localhost/mydb -t COLOUR
where COLOUR is from the HEROKU_POSTGRESQL_COLOUR_URL
from the heroku config
output. 其中的颜色来自heroku config
输出中的HEROKU_POSTGRESQL_COLOUR_URL
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.