tracks/db/migrate/024_add_find_by_name_indices.rb

12 lines
283 B
Ruby
Raw Permalink Normal View History

2019-05-13 18:42:57 +02:00
class AddFindByNameIndices < ActiveRecord::Migration[5.2]
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