0002-multitenant-allow-testing-multitenant-applications-8.patch
hobo/multitenant/management/commands/migrate.py | ||
---|---|---|
6 | 6 |
import django |
7 | 7 |
from django.conf import settings |
8 | 8 |
from django.core.management.base import CommandError, BaseCommand |
9 |
from tenant_schemas.utils import django_is_in_test_mode |
|
9 | 10 | |
10 | 11 |
if django.VERSION < (1, 7, 0): |
11 | 12 |
try: |
... | ... | |
25 | 26 |
"instead. Please read the documentation if you don't know why you " |
26 | 27 |
"shouldn't call migrate directly!".format(database)) |
27 | 28 |
super(Command, self).handle(*args, **options) |
29 | ||
30 |
if django.VERSION >= (1, 7, 0) and django_is_in_test_mode(): |
|
31 |
from .migrate_schemas import MigrateSchemasCommand |
|
32 |
Command = MigrateSchemasCommand |
|
28 |
- |