3

Alembic version tables are an awesome way to manage multiple modules and apps migrations within a single database. I created multiple alembic_version tables based on apps and modules just as shown in Alembic few modules to single database. But the problem is i already have 20 version tables because of 20 different apps and modules. The probability of it increasing to more than 200 very soon is high. I don't want 200 alembic version tables in my schema. How do i merge all of the alembic version tables into a single table with version number as 1 column and add 2 more columns that specify app_name and module_name. This table might have 200+ rows but the app_name and module_name combination will be unique. I've been looking at the source code of alembic library in alembic/command.py but it does not have many options that makes my use case possible.

Tejus Prasad
  • 6,322
  • 7
  • 47
  • 75
  • Unfortunately in the latest version (1.7.4) of Alembic , each version table still works for individual app , would be much better if the version table could have one more column that represents app label – Ham Nov 12 '21 at 10:41

0 Answers0