def get_change_column_query(f, new):
 desc = frappe.db.sql((u'desc `tab%s`' % f[u'parent']))
 for d in desc:
  if (d[0] == f[u'fieldname']):
   return (u'alter table `tab%s` change `%s` `%s` %s' % (f[u'parent'], f[u'fieldname'], new, d[1]))

def get_change_column_query ( f , new ) : desc = frappe . db . sql ( ( u'desc `tab%s`' % f [ u'parent' ] ) ) for d in desc : if ( d [ 0 ] == f [ u'fieldname' ] ) : return ( u'alter table `tab%s` change `%s` `%s` %s' % ( f [ u'parent' ] , f [ u'fieldname' ] , new , d [ 1 ] ) )
generate change fieldname query .