Django migration discovery - get migrations from a different directory

149 Views Asked by At

Lets say i have the same django project (multi-tenant project) in different code version, version a and newer version b. version b has some new migrations. I'm currently running version a on my production environment and want only to migrate the DB to the new version (the migrations are as such that it won't cause problems for version a to run correctly). so up until now, i would clone the repository with the new version b and run on it manage.py migrate and all is well.
The problem is that now, version a can make new tenants (which means new schemas). - each new schema runs the migrations of the current version so in potential, there is a situation where a schema is created with the migrations of version a although version b ran its migrations and the DB is one step ahead.

Looking for:
I would like to have a configuration so that the command migrate_schemas of the manage.py of version a will migrate against the code base of version b. Is this possible?

Tech stuff

  • Django 1.8
  • django-tenants 1.1.7
  • python 2.7.6

Thanks!

0

There are 0 best solutions below