Noting why we don't have an email uniqueness constraint in the db.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 17 May 2013 19:10:29 +0000 (14:10 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 17 May 2013 19:10:29 +0000 (14:10 -0500)
This commit sponsored by Guido Günther.  Thanks!

mediagoblin/db/models.py

index 2412706e56e8a3d1cf7a8904fb1c2051d3fa07d6..2b92598344baaaee3edefbc6e877878077c97de0 100644 (file)
@@ -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)