From 0198a2fa13ab3f784fa17556e3831343cb9518d7 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Sun, 2 May 2010 18:25:25 +0200 Subject: [PATCH] fix #936 by adding index on state for todos. Needs migration of database. --- db/migrate/20100502162317_add_index_to_todo_state.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20100502162317_add_index_to_todo_state.rb diff --git a/db/migrate/20100502162317_add_index_to_todo_state.rb b/db/migrate/20100502162317_add_index_to_todo_state.rb new file mode 100644 index 00000000..6e3d01bf --- /dev/null +++ b/db/migrate/20100502162317_add_index_to_todo_state.rb @@ -0,0 +1,9 @@ +class AddIndexToTodoState < ActiveRecord::Migration + def self.up + add_index :todos, :state + end + + def self.down + remove_index :todos, :state + end +end \ No newline at end of file