From: Christopher Allan Webber Date: Fri, 8 Aug 2014 14:50:16 +0000 (-0500) Subject: If the constraint already exists, roll back to a sane state. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ed0b981edc868046575d9e451077e79c7b0e4016;p=mediagoblin.git If the constraint already exists, roll back to a sane state. --- diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py index a7e026c6..fca7819b 100644 --- a/mediagoblin/db/migrations.py +++ b/mediagoblin/db/migrations.py @@ -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()