{"repo":"tortoise/aerich","free":true,"listed":false,"github":"https://github.com/tortoise/aerich","clone":"git clone https://github.com/tortoise/aerich.git","description":"A database migrations tool for TortoiseORM, ready to production.","language":"Python","stars":1083,"topics":["tortoise-orm","migration-tool","mysql","postgresql","database-migrations","orm"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"Aerich ⚠️ Warning For tortoise-orm =1.0.0, you can use the built-in cli for migrating, e.g.: python -m tortoise makemigrations See more at: https://github.com/tortoise/tortoise-orm?tab=readme-ov-file#migrations English Русский Introduction Aerich is a database migrations tool for TortoiseORM, which is like alembic for SQLAlchemy, or like Django ORM with it\\'s own migration solution. Install Just install from pypi: Or install the latest version directly from github with the following command: Quick Start Usage First, you need to include aerich.models in your Tortoise‑ORM config. Example: Note: This can be omitted if there is only one item in \"apps\". Initialization Initialize the config file and migrations location: Note : aerich will import the config file when running init-db/migrate/upgrade/heads/history commands, so it is better to keep this file simple and clean. To apply per app migrations style(like Django), set the location option with a '{app}', such as: --location \"./{app}/migrations\" Init db If your Tortoise-ORM app is not the default models , you must specify the correct app via --app , e.g. aerich --app other models init-db . Update models and make migrate Format of migrate filename is {version num} {datetime} {name update}.py . If aerich guesses you are renaming a column, it will ask Rename {old column} to {new column} [True] . You can choose True to rename column without column drop, or choose False to drop the column then create. Note that the latter may lose da","default_branch":null,"files":null,"tree":[],"storefront":"/r/tortoise","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tortoise/aerich/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}