theforeman / foreman_default_hostgroup

A plugin to set the default hostgroup when hosts are created.
GNU General Public License v3.0
11 stars 29 forks source link

Failure in migration step with Foreman 3.7 when run with foreman-installer after initial installation #59

Closed JohnCasey closed 2 months ago

JohnCasey commented 1 year ago

When activating the plugin after the initial foreman installation, the rake tasks abort with the message in the log file:

column 'settings.category' does not exist

According to https://github.com/theforeman/foreman/pull/9524 there was a change introduced with foreman 3.7 to drop this column.

Please update the migration to support foreman 3.7, maybe changing the migration to the following as mentioned in the linked post above is sufficient:

Setting.where(category: 'Setting::Plugin').update_all(category: 'Setting') if column_exists?(:settings, :category)
donnydavis commented 7 months ago

I just did this on my machine and it does resolve the issue.

evgeni commented 2 months ago

https://github.com/theforeman/foreman_default_hostgroup/pull/64 is merged