Sha256: 0271f559a4e07122693bf44c12eb43cca6d5c1d49a81fde4942117974cc0ab7d

Contents?: true

Size: 452 Bytes

Versions: 11

Compression:

Stored size: 452 Bytes

Contents

class CreateMyAdminUserGroups < ActiveRecord::Migration
  def self.up
    create_table :my_admin_user_groups do |t|
      t.integer :user_id
      t.integer :group_id
      t.timestamps
    end
    add_index :my_admin_user_groups, [:user_id, :group_id], :unique => true, :name => 'my_admin_user_groups_index'
    
  end

  def self.down
    remove_index :my_admin_user_groups, "my_admin_user_groups_index"
    drop_table :my_admin_user_groups
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
my_admin-0.0.12 lib/generators/my_admin/install/templates/migrations/user_groups.rb
my_admin-0.0.11 lib/generators/my_admin/install/templates/migrations/user_groups.rb
my_admin-0.0.10 lib/generators/my_admin/install/templates/migrations/user_groups.rb
my_admin-0.0.9 lib/generators/my_admin/install/templates/migrations/user_groups.rb
my_admin-0.0.8 lib/generators/my_admin/install/templates/migrations/user_groups.rb
my_admin-0.0.7 lib/generators/my_admin/install/templates/migrations/user_groups.rb
my_admin-0.0.6 lib/generators/my_admin/install/templates/migrations/user_groups.rb
my_admin-0.0.5 lib/generators/my_admin/install/templates/migrations/user_groups.rb
my_admin-0.0.4 lib/generators/my_admin/install/templates/migrations/user_groups.rb
my_admin-0.0.3 lib/generators/my_admin/install/templates/migrations/user_groups.rb
my_admin-0.0.2 lib/generators/my_admin/install/templates/migrations/user_groups.rb