Update Foreman from 2.5.4 to 3.0

Problem:
foreman-rake db:migrate aborted

== 20201125113903 MigratePuppetclassesToFacets: migrating =====================
-- add_reference(:host_classes, :host_puppet_facet, {:foreign_key=>true, :index=>true})
   -> 0.0059s
-- add_reference(:hostgroup_classes, :hostgroup_puppet_facet, {:foreign_key=>true, :index=>true})
   -> 0.0033s
-- deleting classes  appliance::server, server::jenkins Host (id=1832) because it has no environment
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "audits_pkey"
DETAIL:  Key (id)=(118909) already exists.
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/postgresql_adapter.rb:675:in `exec_params'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/postgresql_adapter.rb:675:in `block (2 levels) in exec_no_cache'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/postgresql_adapter.rb:674:in `block in exec_no_cache'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract_adapter.rb:722:in `block (2 levels) in log'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract_adapter.rb:721:in `block in log'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract_adapter.rb:712:in `log'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/postgresql_adapter.rb:673:in `exec_no_cache'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/postgresql_adapter.rb:656:in `execute_and_clear'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `exec_query'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:135:in `exec_insert'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:132:in `exec_insert'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:166:in `insert'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/query_cache.rb:22:in `insert'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/persistence.rb:375:in `_insert_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/persistence.rb:932:in `_create_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/counter_cache.rb:166:in `_create_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/locking/optimistic.rb:70:in `_create_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/attribute_methods/dirty.rb:211:in `_create_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/callbacks.rb:331:in `block in _create_record'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:135:in `run_callbacks'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:825:in `_run_create_callbacks'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/callbacks.rb:331:in `_create_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/timestamp.rb:110:in `_create_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/persistence.rb:905:in `create_or_update'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/callbacks.rb:327:in `block in create_or_update'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:135:in `run_callbacks'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:825:in `_run_save_callbacks'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/callbacks.rb:327:in `create_or_update'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/timestamp.rb:128:in `create_or_update'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/persistence.rb:470:in `save'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/validations.rb:47:in `save'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:314:in `block in save'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:375:in `block in with_transaction_returning_status'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:278:in `transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:212:in `transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:366:in `with_transaction_returning_status'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:314:in `save'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/suppressor.rb:44:in `save'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/associations/collection_association.rb:362:in `insert_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/associations/has_many_association.rb:36:in `insert_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/associations/collection_association.rb:347:in `block (2 levels) in _create_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/associations/collection_association.rb:447:in `replace_on_target'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/associations/collection_association.rb:285:in `add_to_target'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/associations/collection_association.rb:346:in `block in _create_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/associations/collection_association.rb:135:in `block in transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:278:in `transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:212:in `transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/associations/collection_association.rb:134:in `transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/associations/collection_association.rb:344:in `_create_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/associations/has_many_association.rb:115:in `_create_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/associations/association.rb:195:in `create'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/associations/collection_proxy.rb:347:in `create'
/usr/share/gems/gems/audited-4.9.0/lib/audited/auditor.rb:291:in `block in write_audit'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:139:in `run_callbacks'
/usr/share/gems/gems/audited-4.9.0/lib/audited/auditor.rb:290:in `write_audit'
/usr/share/gems/gems/audited-4.9.0/lib/audited/auditor.rb:269:in `audit_create'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:428:in `block in make_lambda'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:238:in `block in halting_and_conditional'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:517:in `block in invoke_after'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:517:in `each'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:517:in `invoke_after'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:136:in `run_callbacks'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:825:in `_run_create_callbacks'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/callbacks.rb:331:in `_create_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/timestamp.rb:110:in `_create_record'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/persistence.rb:905:in `create_or_update'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/callbacks.rb:327:in `block in create_or_update'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:135:in `run_callbacks'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:825:in `_run_save_callbacks'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/callbacks.rb:327:in `create_or_update'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/timestamp.rb:128:in `create_or_update'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/persistence.rb:470:in `save'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/validations.rb:47:in `save'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:314:in `block in save'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:375:in `block in with_transaction_returning_status'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:278:in `transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:212:in `transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:366:in `with_transaction_returning_status'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:314:in `save'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/suppressor.rb:44:in `save'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/persistence.rb:38:in `create'
/usr/share/gems/gems/foreman_puppet-1.0.5/db/migrate/20201125113903_migrate_puppetclasses_to_facets.foreman_puppet.rb:33:in `block in up'
/usr/share/gems/gems/foreman_puppet-1.0.5/db/migrate/20201125113903_migrate_puppetclasses_to_facets.foreman_puppet.rb:31:in `each'
/usr/share/gems/gems/foreman_puppet-1.0.5/db/migrate/20201125113903_migrate_puppetclasses_to_facets.foreman_puppet.rb:31:in `up'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:831:in `exec_migration'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:812:in `block (2 levels) in migrate'
/usr/share/ruby/benchmark.rb:293:in `measure'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:811:in `block in migrate'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:471:in `with_connection'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:810:in `migrate'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1002:in `migrate'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1310:in `block in execute_migration_in_transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1361:in `block in ddl_transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:212:in `transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1361:in `ddl_transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1309:in `execute_migration_in_transaction'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1281:in `block in migrate_without_lock'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1280:in `each'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1280:in `migrate_without_lock'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1229:in `block in migrate'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1382:in `with_advisory_lock'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1229:in `migrate'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1061:in `up'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/migration.rb:1036:in `migrate'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/tasks/database_tasks.rb:238:in `migrate'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/databases.rake:86:in `block (3 levels) in <top (required)>'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/databases.rake:84:in `each'
/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/databases.rake:84:in `block (2 levels) in <top (required)>'
/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute'
/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:281:in `each'
/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:281:in `execute'
/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:199:in `synchronize'
/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/share/gems/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:160:in `invoke_task'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:116:in `each'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:116:in `block in top_level'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:125:in `run_with_threads'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:110:in `top_level'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:83:in `block in run'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/share/gems/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/bin/rake:23:in `load'
/usr/bin/rake:23:in `<main>'

Foreman and Proxy versions:
Foreman Version 2.5.4
Foreman and Proxy plugin versions:
Foreman Version 2.5.4
Distribution and version:
Red Hat 8