heroku rake db:structure:load failure

僤鯓⒐⒋嵵緔 提交于 2019-12-06 20:20:59

问题


I need to use some PostgreSQL proprietary features such as rules and triggers for table partitioning. As long as I know, these kind of features cannot be dump to schema.rb so I have changed my schema_format configuration parameter to :sql.

Now, when I try to load rake db:structure:load to load the generated structure.sql into the heroku database, it fails saying: sh: psql: not found

How can I do it?


回答1:


You can use pg:psql to run the script from your development machine against the database:

cd your-rails-project
heroku pg:psql -a your-app-name <db/structure.sql

Just make sure that the branch you have checked out locally is the same as the one you have deployed.



来源:https://stackoverflow.com/questions/16915793/heroku-rake-dbstructureload-failure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!