tortoise / aerich

A database migrations tool for TortoiseORM, ready to production.
https://github.com/tortoise/aerich
Apache License 2.0
843 stars 96 forks source link

How to run aerich from python code? #104

Open evstratbg opened 3 years ago

evstratbg commented 3 years ago

I want to make migrations before web app is up. Best way to make it?

evstratbg commented 3 years ago

any help?

long2ice commented 3 years ago

No plan to support this, or you can run system command in python code.

metakot commented 3 years ago

Seconding this. A way to run migrations from python is a really good option to have.

long2ice commented 3 years ago

If you want, you can use os.system to run aerich command

long2ice commented 3 years ago

Reopen this to look more.