I'm trying to migrate to postgres by following the manual:
http://theforeman.org/manuals/1.3/index.html#3.5.3DatabaseSetup
However, I'm stuck on the db:convert:prod2dev step. Got the following
message. Any suggestion? Possible bug?
[compass@puppet foreman]$ sudo /opt/rh/ruby193/root/usr/bin/rake --trace
db:convert:prod2dev
** Invoke db:convert:prod2dev (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:convert:prod2dev
Converting resources…rake aborted!
PGError: ERROR: relation "resources" does not exist
LINE 1: DELETE FROM "resources"
^
: DELETE FROM "resources"
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1158:in
async_exec' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1158:in
exec_no_cache'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:675:in
block in exec_delete' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in
block in log'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in
instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in
log'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:674:in
exec_delete' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:101:in
delete'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in
delete' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:413:in
delete_all'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/querying.rb:7:in
delete_all' /usr/share/foreman/lib/tasks/convert.rake:104:in
block (4 levels) in <top
(required)>'
/usr/share/foreman/lib/tasks/convert.rake:84:in each' /usr/share/foreman/lib/tasks/convert.rake:84:in
block (3 levels) in <top
(required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in call' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in
block in execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in each' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in
execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in block in invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in
mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in
invoke_with_call_chain' /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in
invoke'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in invoke_task' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in
block (2
levels) in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in each' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in
block in
top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in
standard_exception_handling' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in
top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in block in run' /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in
standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in run' /opt/rh/ruby193/root/usr/bin/rake:32:in
<main>'
Tasks: TOP => db:convert:prod2dev