aerich
aerich copied to clipboard
Add `__eq__` method for `Index` instances
Fix https://github.com/tortoise/aerich/issues/258
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.