From 1de794c6f0e8909d18e9e4478820d81184b9bc29 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 8 Aug 2014 09:47:33 -0500 Subject: [PATCH] Explaining why we're committing mid-migration --- mediagoblin/db/migrations.py | 4 ++++ 1 file changed, 4 insertions(+) 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: -- 2.25.1