tracks/db/migrate/024_add_find_by_name_indices.rb
2008-05-20 21:28:26 +01:00

11 lines
278 B
Ruby

class AddFindByNameIndices < ActiveRecord::Migration
def self.up
add_index :projects, [:user_id, :name]
add_index :contexts, [:user_id, :name]
end
def self.down
remove_index :projects, [:user_id, :name]
remove_index :contexts, [:user_id, :name]
end
end