tortoise / aerich

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

Make parent directories as needed #108

Closed lqmanh closed 3 years ago

lqmanh commented 3 years ago

When running aerich init and aerich init-db, it's useful to auto create intermediate directories if not exist (same as POSIX mkdir -p). The reason behind this is that I always have to manually run mkdir migrations before aerich init-db when I need to reset database/migrations. Or else, FileNotFoundError: [Errno 2] No such file or directory: 'migrations/models' is thrown.

long2ice commented 3 years ago

Thanks for contribution!