spree_auth_devise icon indicating copy to clipboard operation
spree_auth_devise copied to clipboard

Login without email impossible due to unique index on `email` column

Open bricesanchez opened this issue 7 years ago • 0 comments

Hi !

I face a problem with spree_auth_devise when i don't want to use email field in Spree::User records.

I'm able to disable validate presence of email like we can do it in Devise: https://github.com/plataformatec/devise/blob/master/lib/devise/models/validatable.rb#L37

But spree_users table has a unique index on email column who prevents me to validate a record without email starting from the second record without email: https://github.com/spree/spree_auth_devise/blob/master/db/migrate/20120605211305_make_users_email_index_unique.rb

Could we rollback this migration?

bricesanchez avatar Mar 09 '18 16:03 bricesanchez