This issue happens because new_indexes.difference(old_indexes) [code] and old_indexes.difference(new_indexes) [code] returns always all indexes, even when they are equal.
This PR fixes this by adding the __eq__ to all Index instances. To ensure that indexes are equal we compare them using the __hash__ method.
Fix https://github.com/tortoise/aerich/issues/258
This issue happens because
new_indexes.difference(old_indexes)
[code] andold_indexes.difference(new_indexes)
[code] returns always all indexes, even when they are equal.This PR fixes this by adding the
__eq__
to allIndex
instances. To ensure that indexes are equal we compare them using the__hash__
method.