From dcba14c9ce0af09aaa996ed2cf4e7e376e9819b2 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Thu, 25 Apr 2013 19:03:53 -0400 Subject: [PATCH] Indexing email causes errors with blank fields --- db/migrate/20130425230007_remove_index_email_from_users.rb | 5 +++++ db/schema.rb | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20130425230007_remove_index_email_from_users.rb diff --git a/db/migrate/20130425230007_remove_index_email_from_users.rb b/db/migrate/20130425230007_remove_index_email_from_users.rb new file mode 100644 index 0000000..45ccc01 --- /dev/null +++ b/db/migrate/20130425230007_remove_index_email_from_users.rb @@ -0,0 +1,5 @@ +class RemoveIndexEmailFromUsers < ActiveRecord::Migration + def change + remove_index "users", :name => 'index_users_on_email' + end +end diff --git a/db/schema.rb b/db/schema.rb index 381e886..ee2b501 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130424230817) do +ActiveRecord::Schema.define(:version => 20130425230007) do # Could not dump table "alerts" because of following StandardError # Unknown type 'enum' for column 'semester' @@ -50,7 +50,6 @@ ActiveRecord::Schema.define(:version => 20130424230817) do t.string "username" end - add_index "users", ["email"], :name => "index_users_on_email", :unique => true add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true create_table "users_roles", :id => false, :force => true do |t|