You have 7 pending migrations:

ERF64-6496 [Foreman::MaintenanceException]: There are migrations pending in the system.

Expected outcome:
working forman

Foreman and Proxy versions:

Foreman and Proxy plugin versions:

Distribution and version:
rhel 8.6
Other relevant data:

I try # foreman-rake db:migrate
== 20211108211312 AddMissingPermissions: migrating ============================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

Validation failed: Name has already been taken

spitting through logs I see this

/usr/sbin/foreman-rake db:abort_if_pending_migrations

You have 7 pending migrations:
20211108211312 AddMissingPermissions
20211123170430 TasksSettingsToDslCategory
20220118160349 DropSaltHideRunSaltButtonSetting
20220321101835 RenameSshProviderToScript
20220331112719 AddSshUserToJobInvocation
20220406185204 FixSaltSettingCategoryToDsl
2021051713291621250977 AddHostProxyInvocations
Run bin/rails db:migrate to update your database then try again.

How can I fix this? Please help.

Is there a way to get the templates out of the dump (I have a db dump) and import them after a clean reinstall? I need to get this working asap, but need to safeguard the templates I have already in here.

ok, making progress. I have removed the salt proxy packages, and now I can migrate the db and start the foreman again. I will snapshot and retry.

It seems more people reported similar problem. Could you also please capture production.log while the db:migrate fails? That would help salt maintainers find out the cause.

Exactly I had the problem too. I solve it after I recover db from backup und run whole process again!
I hope you(Foreman Team) can solve this problem…