Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update users migration template to make email column case insensitive #597

Closed
matthewmcgarvey opened this issue Jan 16, 2021 · 0 comments · Fixed by #657
Closed

Update users migration template to make email column case insensitive #597

matthewmcgarvey opened this issue Jan 16, 2021 · 0 comments · Fixed by #657

Comments

@matthewmcgarvey
Copy link
Member

With the addition of citext support in luckyframework/avram#608 it seems like a good idea to use it for user emails so that a person who makes an account with "MyAccount@example.com" can sign in with "myaccount@example.com" and no one else can make an account with the same email but with different capitalization.

create table_for(User) do
primary_key id : Int64
add_timestamps
add email : String, unique: true
add encrypted_password : String
end
end

We would have to update the migration first to enable the citext extension and then add case_sensitive: false to the email line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant