aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2014-08-08 09:47:33 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2014-08-08 09:47:33 -0500
commit1de794c6f0e8909d18e9e4478820d81184b9bc29 (patch)
tree79f5db7eaed1b3ec9136762e9291d18a09218108
parente6288a68e1d08538e40bf88ba8bcf3ac242decda (diff)
downloadmediagoblin-1de794c6f0e8909d18e9e4478820d81184b9bc29.tar.lz
mediagoblin-1de794c6f0e8909d18e9e4478820d81184b9bc29.tar.xz
mediagoblin-1de794c6f0e8909d18e9e4478820d81184b9bc29.zip
Explaining why we're committing mid-migration
-rw-r--r--mediagoblin/db/migrations.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py
index 6ca10b57..a7e026c6 100644
--- a/mediagoblin/db/migrations.py
+++ b/mediagoblin/db/migrations.py
@@ -870,6 +870,10 @@ def revert_username_index(db):
if u'ix_core__users_username' in indexes:
index = indexes[u'ix_core__users_username']
index.drop()
+
+ # Given we're removing indexes then adding a unique constraint
+ # which *we know might fail*, thus probably rolling back the
+ # session, let's commit here.
db.commit()
try: