From 4c5e63b31b2cd3d55d617574f7c69d0d7f89e581 Mon Sep 17 00:00:00 2001 From: Pius Uzamere Date: Sun, 20 Dec 2009 09:34:15 -0500 Subject: [PATCH] adding an index to choices --- db/migrate/20091220142231_add_index_to_choices.rb | 9 +++++++++ 1 file changed, 9 insertions(+), 0 deletions(-) create mode 100644 db/migrate/20091220142231_add_index_to_choices.rb diff --git a/db/migrate/20091220142231_add_index_to_choices.rb b/db/migrate/20091220142231_add_index_to_choices.rb new file mode 100644 index 0000000..a117d42 --- /dev/null +++ b/db/migrate/20091220142231_add_index_to_choices.rb @@ -0,0 +1,9 @@ +class AddIndexToChoices < ActiveRecord::Migration + def self.up + add_index :choices, [:question_id, :score] + end + + def self.down + remove_index :choices, [:question_id, :score] + end +end -- libgit2 0.21.2