aboutsummaryrefslogtreecommitdiffstats
path: root/spec/dummy/db/migrate/20110802081561_add_missing_indexes_to_roles_users.rb
blob: e72d81f0088e919b7c37d81f05715824e01577e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
class AddMissingIndexesToRolesUsers < ActiveRecord::Migration
  def self.up
    add_index ::Refinery::RolesUsers.table_name, [:role_id, :user_id]
    add_index ::Refinery::RolesUsers.table_name, [:user_id, :role_id]
  end

  def self.down
    remove_index ::Refinery::RolesUsers.table_name, :column => [:role_id, :user_id]
    remove_index ::Refinery::RolesUsers.table_name, :column => [:user_id, :role_id]
  end
end