

def create_schema(self, check_if_exists=False, sync_schema=True, verbosity=1):
    "\n        Creates the schema 'schema_name' for this tenant. Optionally checks if\n        the schema already exists before creating it. Returns true if the\n        schema was created, false otherwise.\n        "
    _check_schema_name(self.schema_name)
    cursor = connection.cursor()
    if (check_if_exists and schema_exists(self.schema_name)):
        return False
    cursor.execute(('CREATE SCHEMA %s' % self.schema_name))
    if self:
        call_command('migrate_schemas', schema_name=self.schema_name, interactive=False, verbosity=verbosity)
    connection.set_schema_to_public()

dataset/ETHPy150Open tomturner/django-tenants/django_tenants/models.py TenantMixin.create_schema/VarMisuse@71/167 `sync_schema`->`self`