Skip to content

Commit

Permalink
Added extra except clause to TryRemoveIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirk Moors authored and auvipy committed Sep 15, 2024
1 parent 88d771a commit e46095f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ def database_forwards(self, *args, **kwargs):
super().database_forwards(*args, **kwargs)
except DatabaseError:
pass
except Exception:
# Not all DB engines throw DatabaseError when the
# index does not exist.
pass

def database_backwards(self, *args, **kwargs):
"""Don't re-add the index when reverting this migration"""
Expand Down

0 comments on commit e46095f

Please sign in to comment.