Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the -x flag in env.py #528

Closed
wants to merge 1 commit into from

Conversation

luolingchun
Copy link
Contributor

Support changing the default schema of postgres during migration.

By changing search_path to implement, refer to Rudimental Schema-Level Multi Tenancy for PostgreSQL Databases.

Usage:

flask db migrate -x schema=my_schema

@miguelgrinberg
Copy link
Owner

There are many ways to manage multiple tenants and/or schemas. Given that Alembic does not offer any solution, I prefer to align with it and do the same. The env.py file is supposed to be customized to meet your needs, so these changes are something you should do in your own project, there is no need for them to be in this package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants