Noting why we don't have an email uniqueness constraint in the db.
This commit sponsored by Guido Günther. Thanks!
This commit is contained in:
parent
b69dd85304
commit
fbe8edc21c
@ -55,6 +55,10 @@ class User(Base, UserMixin):
|
||||
|
||||
id = Column(Integer, primary_key=True)
|
||||
username = Column(Unicode, nullable=False, unique=True)
|
||||
# Note: no db uniqueness constraint on email because it's not
|
||||
# reliable (many email systems case insensitive despite against
|
||||
# the RFC) and because it would be a mess to implement at this
|
||||
# point.
|
||||
email = Column(Unicode, nullable=False)
|
||||
created = Column(DateTime, nullable=False, default=datetime.datetime.now)
|
||||
pw_hash = Column(Unicode, nullable=False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user