Explaining why we're committing mid-migration

This commit is contained in:
Christopher Allan Webber 2014-08-08 09:47:33 -05:00
parent e6288a68e1
commit 1de794c6f0

View File

@ -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: