From c6dc3fcd5b413c23ad25045fa4de05fff1ff708d Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Mon, 4 Aug 2008 09:16:01 +0200 Subject: [PATCH] forgot to add new migration in last commit --- app/views/todos/_text_todo.rhtml | 1 + db/migrate/040_add_several_indexes.rb | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 db/migrate/040_add_several_indexes.rb diff --git a/app/views/todos/_text_todo.rhtml b/app/views/todos/_text_todo.rhtml index 87f3647f..34939e3f 100644 --- a/app/views/todos/_text_todo.rhtml +++ b/app/views/todos/_text_todo.rhtml @@ -22,3 +22,4 @@ unless todo.project.nil? result_string << "(" + todo.project.name + ")" end -%><%= result_string -%> + diff --git a/db/migrate/040_add_several_indexes.rb b/db/migrate/040_add_several_indexes.rb new file mode 100644 index 00000000..2c840b11 --- /dev/null +++ b/db/migrate/040_add_several_indexes.rb @@ -0,0 +1,15 @@ +class AddSeveralIndexes < ActiveRecord::Migration + def self.up + add_index :taggings, [:taggable_id, :taggable_type] + add_index :taggings, :tag_id + add_index :recurring_todos, :user_id + add_index :recurring_todos, :state + end + + def self.down + remove_index :taggings, [:taggable_id, :taggable_type] + remove_index :taggings, :tag_id + remove_index :recurring_todos, :user_id + remove_index :recurring_todos, :state + end +end