Skip to content

Using Alembic with multiple tenants, each being different version, but same DB #978

Answered by zzzeek
EgorLu asked this question in Usage Questions
Discussion options

You must be logged in to vote

if these tenants are sharing the same tables, then in order to support tenants on older versions of the code that refers to older versions of the schema, you have to implement a gradual versioning approach to your whole application where you never drop any columns or tables until all tenants have been migrated. application code that is newer also needs to be able to apply data to the "old" columns at runtime if there is data between these tenants that needs to be shared.

overall this is certainly a very major undertaking and it will severely limit how easily you can make schema changes to your database and to your application, as both will always need to be operating against a past versio…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@EgorLu
Comment options

@zzzeek
Comment options

@EgorLu
Comment options

@CaselIT
Comment options

Answer selected by EgorLu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants