* fix: migration with duplicate renaming of columns in some cases
* Update var name
* fix downgrade sql error
* fix test error
* docs: update changelog
* Add unittest
* Move not change line to origin position
* Update sort key to make it more frieldly interactive from multi fields rename
* refactor: remove puzzle vars
* docs: fix PR links in changelog
* fix sort key lambda error
* 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>
* fix: add o2o field does not create constraint when migrating
* Add testcase and update changelog
* docs: update migrating list
* refactor: use `_handle_o2o_fields` instead of `is_o2o=True`
* Remove unused line
* fix: migrate drop the wrong m2m field when model have multi m2m fields
* Make style and update changelog
* refactor: return new lists instead of change argument values in function
* refactor: use custom diff function instead of reorder lists
* docs: fix typo
* Fix hardcoded and rename custom diff function
* Update function doc
* 🐛 Sort m2m fields before comparing them with `diff(...)`
* Add test case and upgrade changelog
---------
Co-authored-by: Waket Zheng <waketzheng@gmail.com>