Commit 5df1166f authored by Dan Jensen's avatar Dan Jensen

Fix migration for SSH key expiration enforcement

This fixes a bug in the migration to enable SSH key expiration
enforcement by default. Specifically, this fixes a bug that caused
no ApplicationSetting record to be selected for update with the
new value.

Changelog: fixed
parent b5578e0a
...@@ -8,7 +8,7 @@ class EnableEnforceSshKeyExpiration < ActiveRecord::Migration[6.0] ...@@ -8,7 +8,7 @@ class EnableEnforceSshKeyExpiration < ActiveRecord::Migration[6.0]
def up def up
ApplicationSetting.reset_column_information ApplicationSetting.reset_column_information
ApplicationSetting.where.not(enforce_ssh_key_expiration: false).each do |application_setting| ApplicationSetting.where.not(enforce_ssh_key_expiration: true).each do |application_setting|
application_setting.update!(enforce_ssh_key_expiration: true) application_setting.update!(enforce_ssh_key_expiration: true)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment