From: Christopher Allan Webber Date: Fri, 8 Aug 2014 14:47:33 +0000 (-0500) Subject: Explaining why we're committing mid-migration X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1de794c6f0e8909d18e9e4478820d81184b9bc29;p=mediagoblin.git Explaining why we're committing mid-migration --- 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: