* increase:
1. Inspectdb adds DECIMAL, DOUBLE, CHAR, TIME data type matching;
2. Add exception handling, avoid the need to manually create the entire table because a certain data type is not supported.
* fix: aerich inspectdb raise KeyError for double in MySQL
* feat: support command `python -m aerich`
* docs: update changelog
* tests: verify mysql inspectdb for float field
* fix mysql uuid field inspect to be charfield
* refactor: use `db_index=True` instead of `index=True` for inspectdb
* docs: update changelog
---------
Co-authored-by: xiechen <xiechen@jinse.com>
Co-authored-by: Waket Zheng <waketzheng@gmail.com>
* fix: aerich migrate raises `tortoise.exceptions.FieldError` when `index.INDEX_TYPE` is not empty
* feat: add `IF NOT EXISTS` to postgres create index template
* chore: explicit declare type hints of function parameters
* feat: support `--fake` for aerich upgrade
* Add `--fake` to downgrade
* tests: check --fake result for aerich upgrade and downgrade
* Update readme
* Fix unittest failed because of `db_field_types` changed
* refactor: improve type hints and document
* 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
* fix: error when there is __init__.py in the migration folder
* fix: check __init__.py in the migration folder
* refactor
* refactor & add test
* refactor
* Update changelog
---------
Co-authored-by: Waket Zheng <waketzheng@gmail.com>
* Update add/drop index template for sqlite
* tests: add sqlite migrate/upgrade command test
* tests: add timeout for sqlite migrate command test
* tests: add test cases for add/drop unique field for sqlite
* fix: sqlite failed to add unique field
* 🐛 Sort m2m fields before comparing them with `diff(...)`
* Add test case and upgrade changelog
---------
Co-authored-by: Waket Zheng <waketzheng@gmail.com>
* Fix KeyError when deleting a field with unqiue=True
* refactor: rename `old_data_unique` to `is_unique_field`
* Add testcases for remove unique field
---------
Co-authored-by: gongchangku <gongchangku@anban.tech>
Co-authored-by: Waket Zheng <waketzheng@gmail.com>