Permalink
Browse files

AddIndexOnUsersPersistenceToken will no longer add index on persisten…

…ce_token if User constant is defined
  • Loading branch information...
1 parent 4ea6ad8 commit a4190d3951f1a3736a029ecccb2dbf30262c6866 @radar radar committed Jun 11, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 core/db/migrate/20100528185820_add_index_on_users_persistence_token.rb
View
4 core/db/migrate/20100528185820_add_index_on_users_persistence_token.rb
@@ -1,5 +1,7 @@
class AddIndexOnUsersPersistenceToken < ActiveRecord::Migration
def change
- add_index :users, :persistence_token
+ unless defined?(User)
+ add_index :users, :persistence_token
+ end
end
end

0 comments on commit a4190d3

Please sign in to comment.