def clone_schema(self, base_schema_name, new_schema_name):
    '\n        Creates a new schema `new_schema_name` as a clone of an existing schema\n        `old_schema_name`.\n        '
    connection.set_schema_to_public()
    cursor = connection.cursor()
    try:
        cursor.execute("SELECT 'clone_schema'::regproc")
    except ProgrammingError:
        self._create_clone_schema_function()
        transaction.commit()
    sql = 'SELECT clone_schema(%(base_schema)s, %(new_schema)s, TRUE)'
    cursor.execute(sql, {'base_schema': base_schema_name, 'new_schema': new_schema_name})
    cursor.close()
Creates a new schema `new_schema_name` as a clone of an existing schema
`old_schema_name`.
def clone_schema(self, base_schema_name, new_schema_name):
    '\n        Creates a new schema `new_schema_name` as a clone of an existing schema\n        `old_schema_name`.\n        '
    connection.set_schema_to_public()
    cursor = connection.cursor()
    try:
        cursor.execute("SELECT 'clone_schema'::regproc")
    except ProgrammingError:
        self._create_clone_schema_function()
        transaction.commit()
    sql = 'SELECT clone_schema(%(base_schema)s, %(new_schema)s, TRUE)'
    cursor.execute(sql, {'base_schema': base_schema_name, 'new_schema': new_schema_name})
    cursor.close()