Is it possible to upgrade a single schema within a multitenant database using Flask-Migrate? #481
Unanswered
jaseel-cognicept
asked this question in
Q&A
Replies: 1 comment
-
You can probably adjust your env.py file to do whatever you need, but keep in mind that Flask-Migrate is a thin integration layer between Flask and Alembic. This question applies to Alembic instead so you may want to search/ask in their discussion forum if you are unable to make it work on your own. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My Flask app runs a multitenant database with each schema reserved for a user. On registration of a new user I create a new schema and run an upgrade to populate the schema with the required tables/data. I've scaled to a point where the performance of the registration route has become unacceptable(~10s) since the upgrade goes through every single schema.
Is there a way to override the upgrade() method from Flask Migrate to do the upgrade only for a specific schema?
Beta Was this translation helpful? Give feedback.
All reactions