tracks/db/migrate/024_add_find_by_name_indices.rb
2019-05-13 18:42:57 +02:00

11 lines
283 B
Ruby

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