2021-06-14 03:09:53 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class EnableEnforceSshKeyExpiration < ActiveRecord::Migration[6.0]
|
|
|
|
class ApplicationSetting < ActiveRecord::Base
|
|
|
|
self.table_name = 'application_settings'
|
|
|
|
end
|
|
|
|
|
|
|
|
def up
|
|
|
|
ApplicationSetting.reset_column_information
|
|
|
|
|
2021-06-15 21:10:04 +00:00
|
|
|
ApplicationSetting.where.not(enforce_ssh_key_expiration: true).each do |application_setting|
|
2021-06-14 03:09:53 +00:00
|
|
|
application_setting.update!(enforce_ssh_key_expiration: true)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|