If the constraint already exists, roll back to a sane state.
This commit is contained in:
@@ -883,6 +883,6 @@ def revert_username_index(db):
|
|||||||
constraint.create()
|
constraint.create()
|
||||||
except ProgrammingError:
|
except ProgrammingError:
|
||||||
# constraint already exists, no need to add
|
# constraint already exists, no need to add
|
||||||
pass
|
db.rollback()
|
||||||
|
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|||||||
Reference in New Issue
Block a user