From 8fabe0f402b297702a11c4745db2d7a48af0cdc1 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Sat, 12 Feb 2011 22:41:30 -0800 Subject: [PATCH] Checking in the migration helps. --- db/migrate/20110213052742_add_more_indicies.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 db/migrate/20110213052742_add_more_indicies.rb diff --git a/db/migrate/20110213052742_add_more_indicies.rb b/db/migrate/20110213052742_add_more_indicies.rb new file mode 100644 index 000000000..137208465 --- /dev/null +++ b/db/migrate/20110213052742_add_more_indicies.rb @@ -0,0 +1,14 @@ +class AddMoreIndicies < ActiveRecord::Migration + def self.up + #For making validates_uniqueness_of, :case_sensitive => false, fast + add_index :users, [:id, :username], :unique => true + add_index :users, [:id, :email], :unique => true + add_index :people, [:id, :diaspora_handle], :unique => true + + #For the includes of photos in the stream + add_index :posts, [:id, :type] + end + + def self.down + end +end