def create_table(self, table, field_types, drop=False, log=log):
    'Create table'
    if drop:
        self.drop_table(table, log=log)
    new_ftypes = OrderedDict()
    for f in field_types:
        (ftype, max_len, dec_len) = field_types[f]
        if dec_len:
            suff = '({},{})'.format(max_len, dec_len)
        elif max_len:
            suff = '({})'.format(max_len)
        else:
            suff = ''
        new_ftypes[f] = self._template('general_type_map')[ftype].replace('()', suff)
    field_types_str = ', \n'.join([((self._fix_f_name(field) + ' ') + new_ftypes[field]) for field in new_ftypes])
    sql = self._template('core.create_table').format(table=table, col_types=field_types_str)
    try:
        self._do_execute(sql)
    except Exception as e:
        raise e
    log('Created table "{}"'.format(table))
Create table
def create_table(self, table, field_types, drop=False, log=log):
    
    if drop:
        self.drop_table(table, log=log)
    new_ftypes = OrderedDict()
    for f in field_types:
        (ftype, max_len, dec_len) = field_types[f]
        if dec_len:
            suff = '({},{})'.format(max_len, dec_len)
        elif max_len:
            suff = '({})'.format(max_len)
        else:
            suff = 
        new_ftypes[f] = self._template('general_type_map')[ftype].replace('()', suff)
    field_types_str = ', \n'.join([((self._fix_f_name(field) + ' ') + new_ftypes[field]) for field in new_ftypes])
    sql = self._template('core.create_table').format(table=table, col_types=field_types_str)
    try:
        self._do_execute(sql)
    except Exception as e:
        raise e
    log('Created table "{}"'.format(table))