Releases: tortoise/aerich
Releases · tortoise/aerich
v0.9.2
After upgrade to this release, projects with previous migration files generated by 'aerich<=0.9.1', must run the following command to fill 'MODELS_STATE' into the migration files.
aerich fix-migrations
Added
- Support
--offlinefor aerich migrate. (#441) - Add
RUN_IN_TRANSACTIONattr to migration files (#470) - feat: support class var config (#474)
- feat: auto add aerich.models (#476)
- feat: add
load_tortoise_configfunction (#489)
Changed
- refactor: use dataclass instead of pydantic for inspectdb (#466)
- refactor: use
ctx.with_async_resourceinstead of magic patchContext.__aexit__(#488) - feat: migrate from poetry to uv (#481)
- refactor: simplify
run_async(#493) - refactor: use
anyioinstead of pytest-asyncio for async test (#494)
Fixed
- fix: pgvector data types cause errors (#468)
- fix: postgres does not drop unique constraint when migrating (#484)
- fix: rescursive m2m generating migration error (#478)
- fix: postgres m2m set comment before table created (#482)
- fix: refactor module importing to work with byte compiled migrations (#458)
- fix: migration leads to constraint key error (#491)
- fix: m2m table not removed when dropping model (#486)
- fix: mysql alter column unique to indexed dropping error index name (#473)
v0.9.1
v0.9.0
v0.8.2
v0.8.2
Added
- Support changes
max_lengthor int type for primary key field. (#428) - feat: support psycopg. (#425)
- Support run
poetry add aerichin project that inited by poetry v2. (#424) - feat: support command
python -m aerich. (#417) - feat: add --fake to upgrade/downgrade. (#398)
- Support ignore table by settings
managed=FalseinMetaclass. (#397)
Fixed
- fix: aerich migrate raises tortoise.exceptions.FieldError when
index.INDEX_TYPEis not empty. (#415) - No migration occurs as expected when adding
unique=Trueto indexed field. (#404) - fix: inspectdb raise KeyError 'int2' for smallint. (#401)
- fix: inspectdb not match data type 'DOUBLE' and 'CHAR' for MySQL. (#187)
Changed
- Refactored version management to use
importlib.metadata.version(__package__)instead of hardcoded version string (#412)
New Contributors
- @Abdeldjalil-H made their first contribution in #412
- @alistairmaclean made their first contribution in #413
- @radluz made their first contribution in #251
- @ProgrammerPlus1998 made their first contribution in #187
Full Changelog: v0.8.1...v0.8.2
v0.8.1
Changed
- Move
tomlkitto optional and supportpip install aerich[toml]. (#392) - Add version constraint(>=0.21) for tortoise-orm. (#388)
- Allow run
aerich init-dbwith empty migration directories instead of abort with warnings. (#286)
Fixed
- fix: add o2o field does not create constraint when migrating. (#396)
- Migration with duplicate renaming of columns in some cases. (#395)
- fix: intermediate table for m2m relation not created. (#394)
- Migrate add m2m field with custom through generate duplicated table. (#393)
- Migrate drop the wrong m2m field when model have multi m2m fields. (#376)
- KeyError raised when removing or renaming an existing model. (#386)
- fix: error when there is
__init__.pyin the migration folder. (#272) - Setting null=false on m2m field causes migration to fail. (#334)
- Fix NonExistentKey when running
aerich initwithout[tool]section in config file. (#284) - Fix configuration file reading error when containing Chinese characters. (#286)
- sqlite: failed to create/drop index. (#302)
- PostgreSQL: Cannot drop constraint after deleting or rename FK on a model. (#378)
- Fix create/drop indexes in every migration. (#377)
- Sort m2m fields before comparing them with diff. (#271)
v0.8.0
- Fix the issue of parameter concatenation when generating ORM with inspectdb (#331)
- Fix KeyError when deleting a field with unqiue=True. (#364)
- Correct the click import. (#360)
- Improve CLI help text and output. (#355)
- Fix mysql drop unique index raises OperationalError. (#346)
Upgrade note:- Use column name as unique key name for mysql
- Drop support for Python3.7
v0.7.2
v0.7.1
v0.7.1rc1
v0.7.0
Now aerich use .py file to record versions.
Upgrade Note:
- Truncate
aerichtable - Delete
migrations/modelsfolder - Run
aerich init-db
- Improve
inspectdbadding support topostgresql::numericdata type - Add support for dynamically load DDL classes easing to add support to
new databases without changingMigrateclass logic - Fix decimal field change. (#246)
- Support add/remove field with index.