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

11 lines
245 B
Ruby

class AddIndexToNotes < ActiveRecord::Migration[5.2]
def self.up
add_index :notes, [:project_id]
add_index :notes, [:user_id]
end
def self.down
remove_index :notes, [:user_id]
remove_index :notes, [:project_id]
end
end