Checking in the migration helps.
This commit is contained in:
parent
753a113aa9
commit
8fabe0f402
1 changed files with 14 additions and 0 deletions
14
db/migrate/20110213052742_add_more_indicies.rb
Normal file
14
db/migrate/20110213052742_add_more_indicies.rb
Normal file
|
|
@ -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
|
||||
Loading…
Reference in a new issue