Sha256: 1c1c66c136a7aa772fe527decc1a9e1fe1ed5824a15c1f855afffa8e6c704d49

Contents?: true

Size: 345 Bytes

Versions: 102

Compression:

Stored size: 345 Bytes

Contents

class AddImportedAttrToAnsibleVariables < ActiveRecord::Migration[5.2]
  def up
    add_column :lookup_keys, :imported, :boolean

    AnsibleVariable.find_in_batches do |batch|
      batch.map do |variable|
        variable.update_attribute :imported, true
      end
    end
  end

  def down
    remove_column :lookup_keys, :imported
  end
end

Version data entries

102 entries across 102 versions & 1 rubygems

Version Path
foreman_ansible-15.0.3 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-15.0.2 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-15.0.1 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-15.0.0 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-14.2.2 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-14.2.1 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-13.0.7 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-14.2.0 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-14.1.1 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-14.1.0 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-13.0.5 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-14.0.0 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-13.0.4 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-13.0.3 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-13.0.2 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-13.0.1 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-13.0.0 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-12.0.7 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-10.4.4 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb
foreman_ansible-7.1.8 db/migrate/20190318094437_add_imported_attr_to_ansible_variables.rb