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 sqlalchemy.py #344

Merged
merged 1 commit into from
Sep 30, 2020
Merged

Update sqlalchemy.py #344

merged 1 commit into from
Sep 30, 2020

Conversation

soulee-dev
Copy link
Contributor

Solution for Issue: #343

The reason why i set length like this

Email address can't exceed 320 References: https://www.rfc-editor.org/rfc/rfc3696.txt
Hashed Password(on bcrypt)'s maximum length is 72
Tokens are must to have sufficient length

@codecov
Copy link

codecov bot commented Sep 27, 2020

Codecov Report

Merging #344 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #344   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines          778       778           
=========================================
  Hits           778       778           
Impacted Files Coverage Δ
fastapi_users/db/sqlalchemy.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5f53b7...d9eb09b. Read the comment docs.

@frankie567
Copy link
Member

Sounds sensible, thanks! However, I'm a bit surprised at the length you provided. I assumed VARCHAR couldn't exceed 255 characters. Am I wrong on this?

@frankie567 frankie567 added the bug Something isn't working label Sep 30, 2020
@soulee-dev
Copy link
Contributor Author

VARCHAR's length can be up to 65,535 after MySQL 5.0.3.
11.3.2 The CHAR and VARCHAR Types
mysql_8_adoption_rate-768x450

And up to 85% uses a newer version than MySQL 5.1.
MySQL 8.x Adoption Rate – Survey Results

@frankie567
Copy link
Member

How, since 2005! Definitely, my DB teacher was not up to date on this (I passed my CS degree in 2013!). Thank you!

All good, then!

@frankie567 frankie567 linked an issue Sep 30, 2020 that may be closed by this pull request
@frankie567 frankie567 merged commit 97cc799 into fastapi-users:master Sep 30, 2020
@frankie567
Copy link
Member

@all-contributors add @lill74 for bug, code

@allcontributors
Copy link
Contributor

@frankie567

I've put up a pull request to add @lill74! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VARCHAR requires a length on dialect mysql
2 participants