Flask Migration Troubleshooting in a Multi-Tenant Application

Job ID: 38731555

Budget: €30 – €250 EUR

I have a Flask application utilizing separate databases (postgresql) for its multi-tenant architecture. I am encountering issues with database migrations not being applied correctly.

One migration should apply tables related to a "shared" database. This is a common db (e.g. tenant ids are stored here).
Another migration should apply tables for all existing tenant databases.
And a third migration should only be triggered after a new tenant was registered (same tables as the second migration).

Code is already in place, but migrations are not applied to the different migration directories (alembic), so tables inside the databases are not created.

I am seraching for someone who already has a deep understanding about how Flask migrations are working. This task is basically about troubleshooting, because code is already in place (of course probably needs to be adjusted).
Related categories: Python PostgreSQL Flask