class AddIndexesToEasyUserTypesEasyUserTypes < ActiveRecord::Migration
  def self.up
    add_index :easy_user_types_easy_user_types, :easy_user_type_id, :name => 'idx_easy_user_vt_euti'
    add_index :easy_user_types_easy_user_types, :easy_user_visible_type_id, :name => 'idx_easy_user_vt_euvti'

    add_index :easy_user_types_easy_user_types, [:easy_user_type_id, :easy_user_visible_type_id], :name => 'idx_easy_user_vt_euvtic', :unique => true
  end

  def self.down
    remove_index :easy_user_types_easy_user_types, :name => 'idx_easy_user_vt_euti'
    remove_index :easy_user_types_easy_user_types, :name => 'idx_easy_user_vt_euvti'

    remove_index :easy_user_types_easy_user_types, :name => 'idx_easy_user_vt_euvtic'
  end
end
