Heroku rake db:schema:load表不存在。

4
在我的Heroku测试环境中,我运行了以下命令:
heroku pg:reset

接着

heroku rake db:schema:load

我遇到了这个错误

-- create_table("cash_drawer_open", {:force=>true})
rake aborted!
PGError: ERROR:  table "cash_drawer_open" does not exist

当然表不存在!!我正在尝试创建它...我做错了什么?
这在我的本地PostgreSQL开发环境中完全正常运行。
4个回答

4
heroku run rake db:schema:load

2
如果本地一切正常,您可以只需执行heroku db:push命令。请确保您已安装了taps宝石,并且应该能够完成任务。

1

尝试使用以下代码重新创建数据库:

heroku rake db:create

0

再次运行迁移

heroku rake db:migrate

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接