-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix create/drop indexes in every migration #377
Fix create/drop indexes in every migration #377
Conversation
c168d24
to
87207f7
Compare
…xes-in-every-migration
return type(self) is type(other) and hash(self) == hash(other) | ||
|
||
setattr(index_cls, "__hash__", _hash) | ||
setattr(index_cls, "__eq__", _eq) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are setting the lower boundary on the tortoise version in #388. Why not just implement __eq__
and __hash__
in Tortoise and set the corresponding version boundary. You won't have to have this hacky code then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@henadzit I check the tortoise version before patch Index and add a TODO
mark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, can you please let me know your arguments for why you want to have the patching code instead of increasing the version requirements?
return type(self) is type(other) and hash(self) == hash(other) | ||
|
||
setattr(index_cls, "__hash__", _hash) | ||
setattr(index_cls, "__eq__", _eq) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, can you please let me know your arguments for why you want to have the patching code instead of increasing the version requirements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Base on #311
Will close #258