Car*_*los 10 heroku ruby-on-rails-3.2 heroku-postgres
我需要使用一些PostgreSQL专有功能,例如规则和触发器来进行表分区.只要我知道,这些功能无法转储到schema.rb,所以我将schema_format配置参数更改为:sql.
现在,当我尝试加载rake db:structure:load将生成的structure.sql加载到heroku数据库时,它失败了:sh:psql:not found
我该怎么做?
小智 7
您可以使用pg:psql
从开发计算机对数据库运行脚本:
cd your-rails-project
heroku pg:psql -a your-app-name <db/structure.sql
Run Code Online (Sandbox Code Playgroud)
只需确保您在本地签出的分支与您部署的分支相同.
归档时间: |
|
查看次数: |
826 次 |
最近记录: |