If the constraint already exists, roll back to a sane state.
This commit is contained in:
parent
1de794c6f0
commit
ed0b981edc
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user