Django using django-tenant-schemas My project requires runtime tenant creation (postgres schema creation), but due to long django migration history, migrations of a new schema take > 10 minutes which is far too long.
So a method is required which skips the migrations, but brings the DB in the correct state.
Reading What should I use instead of syncdb in Django 1.9? and https://docs.djangoproject.com/en/2.0/ref/django-admin/#cmdoption-migrate-run-syncdb
... it seems following could be a solution:
python manage.py migrate auth
# performs migrations for auth and contenttypes contrib apps
python manage.py migrate --run-syncdb
# creates the rest of the database
But what are the consequences of this? Does it mean backwards migrations will not be possible for new schemas? (OK in this project as new schema doesn't have history anyway)
Does it also mean future migrations cannot be applied since there is no correct migration history? That would obviously be a no-go.
FYI version info:
Django==1.11.7
django-tenant-schemas==1.8.0