We have an old instance of foreman (v 1.18.3) and mariadb. The goal is to upgrade foreman to version 2 and then to version 3. First we want to switch db to postgresql (v12) but migration fails. Any help?
Problem:
Running command foreman-rake db:convert:prod2dev fails with error:
Converting hosts...rake aborted!
ActiveModel::MissingAttributeError: can't write unknown attribute `initiated_at`
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/attribute.rb:205:in `with_value_from_database'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/attribute_set.rb:54:in `write_from_user'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/attribute_methods/write.rb:39:in `write_attribute'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/attribute_methods.rb:359:in `[]='
/usr/share/foreman/lib/tasks/convert.rake:131:in `block (7 levels) in <top (required)>'
/usr/share/foreman/lib/tasks/convert.rake:130:in `each'
/usr/share/foreman/lib/tasks/convert.rake:130:in `block (6 levels) in <top (required)>'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/usr/share/foreman/lib/tasks/convert.rake:127:in `block (5 levels) in <top (required)>'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'
/usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/transactions.rb:210:in `transaction'
/usr/share/foreman/lib/tasks/convert.rake:126:in `block (4 levels) in <top (required)>'
/usr/share/foreman/lib/tasks/convert.rake:83:in `each'
/usr/share/foreman/lib/tasks/convert.rake:83:in `block (3 levels) in <top (required)>'
Tasks: TOP => db:convert:prod2dev
(See full trace by running task with --trace)
Expected outcome:
Migration completes without errors.
Foreman and Proxy versions:
1.18.3
Foreman and Proxy plugin versions:
No plugins
Distribution and version:
Ubuntu 16.04.7 LTS
Thank you!