From fbe8edc21c152f70c8bb3a24830deb394570498c Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 17 May 2013 14:10:29 -0500 Subject: [PATCH] Noting why we don't have an email uniqueness constraint in the db. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This commit sponsored by Guido Günther. Thanks! --- mediagoblin/db/models.py | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.25.1