tortoise / aerich

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

Migration not working with two apps #231

Open RichardGuesso opened 2 years ago

RichardGuesso commented 2 years ago

TORTOISE_ORM = { "connections": { "default": DB_URL, "secound": DB_URL_SECOUND, }, "apps": { "models": { "models": ["models", "aerich.models"], "default_connection": "default", }, "models_secound": { "models": ["models"], "default_connection": "secound", }, }, }

With this code, the migrations only happen in the 'app', with the second app it gives a bug even using the --app modelssecond flag, the migrations do not occur, ideally this language of the migration file for a more generic type, because I I create my entire system in sqlite when I go to postgres I have to change the .sql files because they are with SQLITE migration type that doesn't work in postgres. Ideal would be to leave generic like other orms.