From 57d3d4a6ff3e1c40e4704aea8fe252d66d6681cb Mon Sep 17 00:00:00 2001 From: lrbalt Date: Fri, 18 Jan 2008 15:03:31 +0000 Subject: [PATCH] Fixes #632. Adds index for notes. This one needs rake db:migrate Thanks jacannon. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@698 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/db/migrate/037_add_index_to_notes.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tracks/db/migrate/037_add_index_to_notes.rb 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