Commit 2f7e222c3e91b4e2d05e5deefcb37f64ee97f68d

Authored by Pius Uzamere
1 parent b4883a80

indexing

db/migrate/20091219061442_create_visitor_indexes.rb 0 → 100644
@@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
  1 +class CreateVisitorIndexes < ActiveRecord::Migration
  2 + def self.up
  3 + add_index :visitors, [:identifier, :site_id], :unique => true
  4 + end
  5 +
  6 + def self.down
  7 + remove_index :visitors, [:identifier, :site_id]
  8 + end
  9 +end
db/migrate/20091219063003_remove_extraneous_index.rb 0 → 100644
@@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
  1 +class RemoveExtraneousIndex < ActiveRecord::Migration
  2 + def self.up
  3 + remove_index :prompts, [:left_choice_id, :right_choice_id]
  4 + end
  5 +
  6 + def self.down
  7 + add_index :prompts, [:left_choice_id, :right_choice_id]
  8 + end
  9 +end