4 Commits

Author SHA1 Message Date
程序猿过家家
c35282c2a3
fix: inspectdb not match data type 'DOUBLE' and 'CHAR' for MySQL
* 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>
2025-02-19 16:04:15 +08:00
Waket Zheng
557271c8e1
feat: support command python -m aerich (#417)
* feat: support command `python -m aerich`

* docs: update changelog
2025-02-18 15:44:02 +08:00
Waket Zheng
6bdfdfc6db
fix: aerich migrate raises tortoise.exceptions.FieldError when index.INDEX_TYPE is not empty (#415)
* 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
2025-02-13 18:48:45 +08:00
Waket Zheng
b46ceafb2e
feat: support --fake for aerich upgrade (#398)
* 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
2025-02-07 19:44:15 +08:00