Closed spacemanspiff2007 closed 3 years ago
This will also fix/prevent e.g. #95
@long2ice Could you take a look at this? I am currently unable to deploy/use aerich. With this PR it works fine
Your case maybe point here https://github.com/tortoise/aerich/blob/dev/aerich/cli.py#L297
Yes, but with the additional arg I can configure it for both the deployment and local use without having to patch aerich. If you could merge/review the pr it would be really great!
Maybe put it in aerich.ini
is better, which is a global config
Maybe put it in
aerich.ini
is better, which is a global config
This pr does both! It allows configuration through command line arg and through aerich.ini.
[aerich]
tortoise_orm = MyApp.db_models._db.TORTOISE_ORM_CFG
location = ./migrations
src_folder = ./src
[deploy]
tortoise_orm = MyApp.db_models._db.TORTOISE_ORM_CFG
location = ./migrations
src_folder = ./app
@long2ice I reformatted the changed files with black, so I hope your ci runs now properly. I hope this is okay. Otherwise I can revert these changes. Please let me know what you think
Hmm, still fails. 😞
I ran black -l 100 -t py38 aerich/
.
Can you provide me with a hint how I can fix the failing ci check?
@long2ice I think I got it. In the pyproject you specified an older black version. Now it should run fine! 👍
Thanks!
Would you mind making a release so I use the official package for the deployment?
Added an configuration option to specify the path of the source folder. This will make aerich work with various folder structures (e.g. ./src/MyPythonModule) Additionally this will try to import in init and show the user the error message on failure.