Sha256: 17473d95772213c2b0479e127f24cb1476e4638a3945a3c0e8e70bf0b17780cf

Contents?: true

Size: 490 Bytes

Versions: 1

Compression:

Stored size: 490 Bytes

Contents

class CreateRoleAssignments < ActiveRecord::Migration
  def self.up
    create_table :role_assignments do |t|
      t.column :role_id, :integer, :null => false
      t.column :assignee_id, :integer, :null => false
      t.column :assignee_type, :string, :null => false
    end
    add_index :role_assignments, [:role_id, :assignee_id, :assignee_type], :unique => true, :name => 'index_role_assignments_on_role_and_assignee'
  end

  def self.down
    drop_table :role_assignments
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
has_roles-0.0.2 db/migrate/005_create_role_assignments.rb