* Add `__eq__` method for `Index`instances * tests: add Index test case * refactor: compare index instances before set hash and eq func to class * fix: sort fields when generating index hash * docs: update changlog * fix style issue * refactor: use CustomIndex instead of postgres special HashIndex * Check tortoise version before patch Index * Add comment * Add comment for why > work --------- Co-authored-by: dbf <somnium@riseup.net>
8 lines
169 B
Python
8 lines
169 B
Python
from tortoise.indexes import Index
|
|
|
|
|
|
class CustomIndex(Index):
|
|
def __init__(self, *args, **kw) -> None:
|
|
super().__init__(*args, **kw)
|
|
self._foo = ""
|