aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/models.py
diff options
context:
space:
mode:
authorJessica Tallon <jessica@megworld.co.uk>2014-07-17 14:58:24 +0100
committerChristopher Allan Webber <cwebber@dustycloud.org>2014-07-17 10:21:29 -0500
commit892eed590fb30131ea2e8612da5ba22fa24f690c (patch)
tree5039d4678b0529689a4b802a275467f2b5b2dabf /mediagoblin/db/models.py
parentffbf9c8b438ef8d203da54807b6ff5db3cc4d334 (diff)
downloadmediagoblin-892eed590fb30131ea2e8612da5ba22fa24f690c.tar.lz
mediagoblin-892eed590fb30131ea2e8612da5ba22fa24f690c.tar.xz
mediagoblin-892eed590fb30131ea2e8612da5ba22fa24f690c.zip
Fix #894 - index User.username field
This commit sponsored by Emily O'Leary. Thank you!
Diffstat (limited to 'mediagoblin/db/models.py')
-rw-r--r--mediagoblin/db/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py
index e388bd5b..643d5d41 100644
--- a/mediagoblin/db/models.py
+++ b/mediagoblin/db/models.py
@@ -57,7 +57,7 @@ class User(Base, UserMixin):
__tablename__ = "core__users"
id = Column(Integer, primary_key=True)
- username = Column(Unicode, nullable=False, unique=True)
+ username = Column(Unicode, nullable=False, unique=True, index=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