Sha256: b747cafbfa9181e049e56276f0ed3c24b54099c62354a6bf06a7de441006f6d0

Contents?: true

Size: 551 Bytes

Versions: 5

Compression:

Stored size: 551 Bytes

Contents

# To suport "Edit my domain" and "edit my hostgroup" security access control we need
# a mechanism to associate a user with some domains and hostgroups
class AddUserDomainsAndHostgroups < ActiveRecord::Migration
  def self.up
    create_table :user_domains, :id => false do |t|
      t.references :user
      t.references :domain
    end

    create_table :user_hostgroups, :id => false do |t|
      t.references :user
      t.references :hostgroup
    end
  end

  def self.down
    drop_table :user_domains
    drop_table :user_hostgroups
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/db/migrate/20100701081235_add_user_domains_and_hostgroups.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/db/migrate/20100701081235_add_user_domains_and_hostgroups.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/db/migrate/20100701081235_add_user_domains_and_hostgroups.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/db/migrate/20100701081235_add_user_domains_and_hostgroups.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/db/migrate/20100701081235_add_user_domains_and_hostgroups.rb