If the constraint already exists, roll back to a sane state.

This commit is contained in:
Christopher Allan Webber 2014-08-08 09:50:16 -05:00
parent 1de794c6f0
commit ed0b981edc

View File

@ -883,6 +883,6 @@ def revert_username_index(db):
constraint.create()
except ProgrammingError:
# constraint already exists, no need to add
pass
db.rollback()
db.commit()