We need to build a large application that split to multiple modules,
App
- Module1 --> AppDb
- Module2 --> AppDb
- Module3 --> AppDb
Each module, we would like to add alembic version, all modules connect to single database. But we cannot add revision, because it's conflict to other module's revision (because all version store in same table alembic_version, so the migrations conflict with each other).
If you're using separate simple migrations in each of
Module1
,Module2
andModule3
each with their ownenv.py
(or similar), the solution could be to use theversion_table
argument tocontext.configure
, that allows you to override the name of the version table.i.e. modify the
env.py
to something like