tortoise/aerich
A database migrations tool for TortoiseORM, ready to production.
30 Releases
Latest: 8mo ago
v0.9.2Latest
📋 Changes
- Support `--offline` for aerich migrate. ([#441])
- Add `RUN_IN_TRANSACTION` attr to migration files ([#470])
- feat: support class var config ([#474])
- feat: auto add aerich.models ([#476])
- feat: add `load_tortoise_config` function ([#489])
- refactor: use dataclass instead of pydantic for inspectdb ([#466])
- refactor: use `ctx.with_async_resource` instead of magic patch `Context.__aexit__` ([#488])
- feat: migrate from poetry to uv ([#481])
- + 10 more
v0.9.1
🐛 Fixed
- fix: `Command.migrate()` programmatically raises KeyError ([#462])
- fix: `aerich init` removed comments in toml file ([#461])
- fix: cryptic error message when 'aerich.models' not included. ([#454])
- [#462]: https://github.com/tortoise/aerich/pull/462
- [#461]: https://github.com/tortoise/aerich/pull/461
- [#454]: https://github.com/tortoise/aerich/pull/454
v0.9.0
📋 Changes
- Support `--no-input` for aerich migrate. ([#450])
📋 Changed
- Drop support for Python3.8. ([#446])
- Ask confirm before delete same version migration file. ([#451])
- fix: m2m migrate raises TypeError. ([#448])
- fix: `aerich init-db` process is suspended. ([#435])
- fix: migration will incorrectly remove constraints with index deletions. ([#450])
- fix: aerich migrate crashes without init-db & aerich init-db should create folder after validating app. ([#443])
- [#451]: https://github.com/tortoise/aerich/pull/451
- [#450]: https://github.com/tortoise/aerich/pull/450
- + 4 more
v0.8.2
✨ Added
- Support changes `max_length` or int type for primary key field. (#428)
- feat: support psycopg. (#425)
- Support run `poetry add aerich` in 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=False` in `Meta` class. (#397)
🐛 Fixed
- fix: aerich migrate raises tortoise.exceptions.FieldError when `index.INDEX_TYPE` is not empty. (#415)
- No migration occurs as expected when adding `unique=True` to 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 https://github.com/tortoise/aerich/pull/412
- @alistairmaclean made their first contribution in https://github.com/tortoise/aerich/pull/413
- @radluz made their first contribution in https://github.com/tortoise/aerich/pull/251
- @ProgrammerPlus1998 made their first contribution in https://github.com/tortoise/aerich/pull/187
- Full Changelog: https://github.com/tortoise/aerich/compare/v0.8.1...v0.8.2
v0.8.1
📋 Changed
- Move `tomlkit` to optional and support `pip install aerich[toml]`. ([#392])
- Add version constraint(>=0.21) for tortoise-orm. ([#388])
- Allow run `aerich init-db` with 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__.py` in the migration folder. ([#272])
- Setting null=false on m2m field causes migration to fail. ([#334])
- + 22 more
v0.8.0
📋 Changes
- 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)
v0.7.2
📋 Changes
- Support virtual fields.
- Fix modify multiple times. (#279)
- Added `-i` and `--in-transaction` options to `aerich migrate` command. (#296)
- Fix generates two semicolons in a row. (#301)
v0.7.1
📋 Changes
- Fix syntax error with python3.8.10. (#265)
- Fix sql generate error. (#263)
- Fix initialize an empty database. (#267)
v0.7.1rc1Pre-release
📋 Changes
- Fix postgres sql error (#263)
v0.7.0
📋 Changes
- Improve `inspectdb` adding support to `postgresql::numeric` data type
- Add support for dynamically load DDL classes easing to add support to
- Fix decimal field change. (#246)
- Support add/remove field with index.
v0.6.3
📋 Changes
- Improve `inspectdb` and support `postgres` & `sqlite`.
v0.6.2
📋 Changes
- Support migration for specified index. (#203)
v0.6.1
📋 Changes
- Fix `pyproject.toml` not existing error. (#217)
v0.6.0
📋 Changes
- Breaking change: Change default config file from `aerich.ini` to `pyproject.toml`. (#197)
- Remove `pydantic` dependency. (#198)
- `inspectdb` support `DATE`. (#215)
v0.5.8
📋 Changes
- Support `indexes` change. (#193)
v0.5.7
📋 Changes
- Fix no module found error. (#188) (#189)
v0.5.6
📋 Changes
- Add `Command` class. (#148) (#141) (#123) (#106)
- Fix: migrate doesn't use source_field in unique_together. (#181)
v0.5.5
📋 Changes
- Fix KeyError: 'src_folder' after upgrading aerich to 0.5.4. (#176)
- Fix MySQL 5.X rename column.
- Fix `db_constraint` when fk changed. (#179)
v0.5.4v.0.5.4
📋 Changes
- Fix incorrect index creation order. (#151)
- Not catch exception when import config. (#164)
- Support `drop column` for sqlite. (#40)
v0.5.3
📋 Changes
- Fix postgre alter null. (#142)
- Fix default function when migrate. (#147)
v0.5.2
📋 Changes
- Fix rename field on the field add. (#134)
- Fix postgres field type change error. (#135)
- Fix inspectdb for `FloatField`. (#138)
- Support `rename table`. (#139)
v0.5.1
📋 Changes
- Fix tortoise connections not being closed properly. (#120)
- Fix bug for field change. (#119)
- Fix drop model in the downgrade. (#132)
v0.5.0
📋 Changes
- Refactor core code, now has no limitation for everything.
v0.4.4
📋 Changes
- Fix unnecessary import. (#113)
v0.4.3
📋 Changes
- Replace migrations separator to sql standard comment. (Should manual update previous version files)
- Add `inspectdb` command.
v0.4.2
📋 Changes
- Use `.sql` instead of `.json` to store version file.
- Add `rename` column support MySQL5.
- Remove callable detection for defaults. (#87)
- Fix `sqlite` stuck. (#90)
v0.4.1
📋 Changes
- Bug fix. (#91 #93 )
v0.4.0
📋 Changes
- Use `.sql` instead of `.json` to store version file.
- Add `rename` column support MySQL5.
- Remove callable detection for defaults. (#87)
- Fix `sqlite` stuck. (#90)
v0.3.3
📋 Changes
- Fix encoding error. (#75)
- Support multiple databases. (#68)
- Compatible with models file in directory. (#70)
v0.3.2
📋 Changes
- Fix migrate to new database error. (#62)
