PG :: UndefinedTable:错误:关系“column_name”不存在

时间:2014-02-21 05:48:24

标签: ruby-on-rails postgresql heroku ruby-on-rails-4 rails-postgresql

运行pgbackups:restore后,Heroku日志中出现以下错误:

PG::UndefinedTable: ERROR:  relation "column_name" does not exist

当我运行命令pgbackups:restore时,似乎命令会中断/删除数据库。运行该命令后,Heroku向我显示以下消息:

We're sorry, but something went wrong.

If you are the application owner check the logs for more information.

我已完成以下步骤:

1. pg_dump -i -h localhost -p 5432 -U username -F c -b -v -f "Name_development.psql" Name_development
2. Uploaded it to Dropbox
3. heroku run rake db:migrate
4. heroku pgbackups:restore DATABASE 'https://dropbox/link'
5. After that I receive that error

如果我只运行heroku run rake db:migrate,网站会正常打开。唯一的问题是表中没有数据。

可能有什么问题?如何将我的数据传输到Heroku并且不会破坏网站?

谢谢!

编辑1:

当我尝试使用某些GUI工具恢复数据库时,一切正常。

0 个答案:

没有答案
相关问题