0

We need to build a large application that split to multiple modules. Each module has own alembic version table, and in each module we generated the alembic migration, but the problem when I generate a migration file, inside it generate drop of all database tables, I can't specify the context of each migration.

What I want to do is in each module, I want to generate only the migration script about models inside this module and not for others ?

I don't know if I must use a schema per module to resolve that ?

gauss02
  • 1
  • 2
  • You could have a small service to handle migrations. This service should be in charge of: a) delivering a new id to any modules that requires a migration; b) performing migrations gathering all files from each module. Then, there's only one alembic version table with all your changes. – Cheche Jul 27 '20 at 22:43
  • Thanks for your response. But what I want is to generate file migrations by schema and not one migrations file for all modules – gauss02 Jul 28 '20 at 06:55

0 Answers0