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:inexec_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:inblock 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:inlog'
/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:indelete'
/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:indelete_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:inblock (4 levels) in <top
(required)>'
/usr/share/foreman/lib/tasks/convert.rake:84:in each' /usr/share/foreman/lib/tasks/convert.rake:84:inblock (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:inblock 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:inexecute'
/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:inmon_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:ininvoke'
/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:inblock (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:inblock 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:intop_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:instandard_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
 
            