0003-migrate_schemas-remove-migration-of-public-schema-fi.patch
hobo/multitenant/management/commands/migrate_schemas.py | ||
---|---|---|
47 | 47 | |
48 | 48 |
def handle(self, *args, **options): |
49 | 49 |
super(MigrateSchemasCommand, self).handle(*args, **options) |
50 |
self.PUBLIC_SCHEMA_NAME = get_public_schema_name() |
|
51 | ||
52 |
if self.sync_public and not self.schema_name: |
|
53 |
self.schema_name = self.PUBLIC_SCHEMA_NAME |
|
54 | ||
55 |
if self.sync_public: |
|
56 |
self.run_migrations(self.schema_name, settings.SHARED_APPS) |
|
57 | 50 |
if self.sync_tenant: |
58 |
if self.schema_name and self.schema_name != self.PUBLIC_SCHEMA_NAME:
|
|
51 |
if self.schema_name: |
|
59 | 52 |
if not schema_exists(self.schema_name): |
60 | 53 |
raise RuntimeError('Schema "{}" does not exist'.format( |
61 | 54 |
self.schema_name)) |
62 |
- |