Sha256: 2c87e0ae3f780ddb41ea653c189d0d24b1f8aa680f3bf1d0ed31e64813cd16a8

Contents?: true

Size: 492 Bytes

Versions: 15

Compression:

Stored size: 492 Bytes

Contents

class UpdateIdmParams < ActiveRecord::Migration[5.1]
  def up
    Parameter.unscoped.where("name like 'idm_%'").each do |param|
      param.name.gsub!('idm_', 'freeipa_')
      param.without_auditing do
        param.save!(:validate => false)
      end
    end
  end

  def down
    Parameter.unscoped.where("name like 'freeipa_%'").each do |param|
      param.name.gsub!('freeipa_', 'idm_')
      param.without_auditing do
        param.save!(:validate => false)
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
foreman_theme_satellite-14.2.0 db/migrate/20180516103339_update_idm_params.rb
foreman_theme_satellite-13.3.3 db/migrate/20180516103339_update_idm_params.rb
foreman_theme_satellite-14.1.0 db/migrate/20180516103339_update_idm_params.rb
foreman_theme_satellite-13.3.2 db/migrate/20180516103339_update_idm_params.rb
foreman_theme_satellite-13.3.1 db/migrate/20180516103339_update_idm_params.rb
foreman_theme_satellite-14.0.1 db/migrate/20180516103339_update_idm_params.rb
foreman_theme_satellite-14.0.0 db/migrate/20180516103339_update_idm_params.rb
foreman_theme_satellite-13.3.0 db/migrate/20180516103339_update_idm_params.rb
foreman_theme_satellite-13.2.5 db/migrate/20180516103339_update_idm_params.rb
foreman_theme_satellite-13.2.4 db/migrate/20180516103339_update_idm_params.rb
foreman_theme_satellite-13.2.3 db/migrate/20180516103339_update_idm_params.rb
foreman_theme_satellite-13.2.2 db/migrate/20180516103339_update_idm_params.rb
foreman_theme_satellite-13.2.1 db/migrate/20180516103339_update_idm_params.rb
foreman_theme_satellite-13.2.0 db/migrate/20180516103339_update_idm_params.rb
foreman_theme_satellite-13.1.0 db/migrate/20180516103339_update_idm_params.rb