Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails PG::不可定义:错误:关系;列“U名称”;不存在_Ruby On Rails_Postgresql_Heroku_Ruby On Rails 4_Rails Postgresql - Fatal编程技术网

Ruby on rails PG::不可定义:错误:关系;列“U名称”;不存在

Ruby on rails PG::不可定义:错误:关系;列“U名称”;不存在,ruby-on-rails,postgresql,heroku,ruby-on-rails-4,rails-postgresql,Ruby On Rails,Postgresql,Heroku,Ruby On Rails 4,Rails Postgresql,运行pgbackups后,Heroku日志中出现以下错误:restore: 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 th

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

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工具恢复数据库时,一切正常。

运行rake db:migrate after restoredatabase@VijayChouhan,但这会删除我还原的数据库,现在我又有了空数据库。你看了这里,对吗?