'Used to copy data into a new table'

def _copy_data(self, src, dst, field_renames={}, added={}):

    cursor = self._get_connection().cursor()
    src_fields = [column_info[0] for column_info in self._get_connection().introspection.get_table_description(cursor, src)]
    dst_fields = [column_info[0] for column_info in self._get_connection().introspection.get_table_description(cursor, dst)]
    src_fields_new = []
    dst_fields_new = []
    for field in src_fields:
        if (field in field_renames):
            dst_fields_new.append(self.quote_name(field_renames[field]))
        elif (field in dst_fields):
            dst_fields_new.append(self.quote_name(field))
        else:
            continue
        src_fields_new.append(self.quote_name(field))
    for (field, (_, default)) in added.items():
        if (default is not None):
            field = self.quote_name(field)
            src_fields_new.append(('%s    as    %s' % (default, field)))
            dst_fields_new.append(field)
    self.execute(('INSERT    INTO    %s    (%s)    SELECT    %s    FROM    %s;' % (self.quote_name(dst), ',    '.join(dst_fields_new), ',    '.join(src_fields_new), self.quote_name(src))))
