From: Christopher Allan Webber Date: Fri, 17 May 2013 19:10:29 +0000 (-0500) Subject: Noting why we don't have an email uniqueness constraint in the db. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fbe8edc21c152f70c8bb3a24830deb394570498c;p=mediagoblin.git Noting why we don't have an email uniqueness constraint in the db. This commit sponsored by Guido Günther. Thanks! --- diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 2412706e..2b925983 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -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)