Sha256: f6d09b49217be3fe7cf11f50574dab645cf7a5cd2abbdef90a96340d85223c7b

Contents?: true

Size: 847 Bytes

Versions: 36

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

36 entries across 36 versions & 1 rubygems

Version Path
foreman_puppet-3.0.7 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-2.0.7 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-4.0.1 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-4.0.0 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-3.0.6 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-2.0.6 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-2.0.5 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-3.0.5 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-3.0.4 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-2.0.4 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-3.0.3 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-3.0.2 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-2.0.3 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-3.0.1 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-2.0.2 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb
foreman_puppet-2.0.0 db/migrate_foreman/20090802062223_create_puppetclasses.foreman_puppet.rb