Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removed unnecessary db index (Rich Thorne, doctorzaius)

  • Loading branch information...
commit be6d552c8857547986d793cbfa13ab2eb4209800 1 parent a598b9b
@croaky croaky authored
View
6 CHANGELOG.md
@@ -1,5 +1,11 @@
+0.8.9 (unreleased)
+------------------
+
+* Removed unnecessary db index. (Rich Thorne, doctorzaius)
+
0.8.8 (02/25/2010)
------------------
+
* Fixed sign_in and sign_out not setting current_user (Joe Ferris)
0.8.7 (02/21/2010)
View
1  generators/clearance/templates/migrations/create_users.rb
@@ -10,7 +10,6 @@ def self.up
t.timestamps
end
- add_index :users, [:id, :confirmation_token]
add_index :users, :email
add_index :users, :remember_token
end
View
1  generators/clearance/templates/migrations/update_users.rb
@@ -21,7 +21,6 @@ def self.up
existing_indexes = ActiveRecord::Base.connection.indexes(:users)
index_names = existing_indexes.collect { |each| each.name }
new_indexes = [
- [:index_users_on_id_and_confirmation_token, 'add_index :users, [:id, :confirmation_token]'],
[:index_users_on_email, 'add_index :users, :email'],
[:index_users_on_remember_token, 'add_index :users, :remember_token']
].delete_if { |each| index_names.include?(each.first.to_s) }
View
5 test/models/user_test.rb
@@ -2,6 +2,11 @@
class UserTest < ActiveSupport::TestCase
+ # db
+
+ should_have_db_index(:email)
+ should_have_db_index(:remember_token)
+
# signing up
context "When signing up" do
View
2  test/rails_root/config/environment.rb
@@ -1,6 +1,8 @@
require File.join(File.dirname(__FILE__), 'boot')
require 'digest/md5'
+RAILS_GEM_VERSION = "2.3.5"
+
Rails::Initializer.run do |config|
config.load_paths += Dir.glob(File.join(RAILS_ROOT, 'vendor', 'gems', '*', 'lib'))
config.time_zone = 'Eastern Time (US & Canada)'
Please sign in to comment.
Something went wrong with that request. Please try again.