Sha256: f6d09b49217be3fe7cf11f50574dab645cf7a5cd2abbdef90a96340d85223c7b

Contents?: true

Size: 847 Bytes

Versions: 35

Compression:

Stored size: 847 Bytes

Contents

class CreatePuppetclasses < ActiveRecord::Migration[4.2]
  def up
    create_table :puppetclasses do |t|
      t.string :name, limit: 255
      t.string :nameindicator, limit: 255
      t.integer :operatingsystem_id

      t.timestamps null: true
    end
    add_foreign_key(:environments_puppetclasses, :puppetclasses)

    create_table :hosts_puppetclasses, id: false do |t|
      t.references :puppetclass, null: false
      t.references :host, null: false
    end

    create_table :operatingsystems_puppetclasses, id: false do |t|
      t.references :puppetclass, null: false
      t.references :operatingsystem, null: false
    end
  end

  def down
    drop_table :operatingsystems_puppetclasses
    drop_table :hosts_puppetclasses
    remove_foreign_key(:environments_puppetclasses, :puppetclasses)
    drop_table :puppetclasses
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
foreman_puppet-8.0.0 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-6.4.0 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-7.0.0 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-6.3.0 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-6.2.0 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-6.1.1 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-5.1.3 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-6.1.0 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-6.0.1 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-6.0.0 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-5.1.2 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-4.1.1 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-5.1.1 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-5.1.0 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-4.1.0 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-4.0.4 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-5.0.0 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-4.0.3 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-4.0.2 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-3.0.7 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb