Sha256: f82d88906e8a8fc381abdbf5897a13918dd07f733bfa1d12bfd198a0db427faf

Contents?: true

Size: 627 Bytes

Versions: 12

Compression:

Stored size: 627 Bytes

Contents

class CreateEnvironmentClasses < ActiveRecord::Migration[5.0]
  class EnvironmentClass < ApplicationRecord; end

  def up
    rename_table :environments_puppetclasses, :environment_classes
    add_column :environment_classes, :puppetclass_lookup_key_id, :integer
    add_foreign_key :environment_classes, :lookup_keys, column: :puppetclass_lookup_key_id, name: 'environment_classes_lookup_key_id_fk'
  end

  def down
    remove_foreign_key :environment_classes, :lookup_key
    drop_column :environment_classes, :puppetclass_lookup_key_id, :integer
    rename_table :environment_classes, :environments_puppetclasses
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
foreman_puppet-1.0.5 db/migrate_foreman/20120905095532_create_environment_classes.rb
foreman_puppet-1.0.4 db/migrate_foreman/20120905095532_create_environment_classes.rb
foreman_puppet-2.0.0.alpha.2 db/migrate_foreman/20120905095532_create_environment_classes.rb
foreman_puppet-1.0.3 db/migrate_foreman/20120905095532_create_environment_classes.rb
foreman_puppet-1.0.2 db/migrate_foreman/20120905095532_create_environment_classes.rb
foreman_puppet-1.0.1 db/migrate_foreman/20120905095532_create_environment_classes.rb
foreman_puppet-1.0.0 db/migrate_foreman/20120905095532_create_environment_classes.rb
foreman_puppet-1.0.0.rc.2 db/migrate_foreman/20120905095532_create_environment_classes.rb
foreman_puppet-1.0.0.rc.1 db/migrate_foreman/20120905095532_create_environment_classes.rb
foreman_puppet-0.1.0 db/migrate_foreman/20120905095532_create_environment_classes.rb
foreman_puppet-0.0.2 db/migrate_foreman/20120905095532_create_environment_classes.rb
foreman_puppet-0.0.1 db/migrate_foreman/20120905095532_create_environment_classes.rb