diff --git a/tracks/db/migrate/037_add_index_to_notes.rb b/tracks/db/migrate/037_add_index_to_notes.rb new file mode 100644 index 00000000..f21cc105 --- /dev/null +++ b/tracks/db/migrate/037_add_index_to_notes.rb @@ -0,0 +1,11 @@ +class AddIndexToNotes < ActiveRecord::Migration + 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