'Change table name using `RENAME TABLE` if table exists. Or update
`doctype` property for Single type.'

def after_rename(self, old, new, merge=False):

    if self.issingle:
        frappe.db.sql(u'update    tabSingles    set    doctype=%s    where    doctype=%s', (new, old))
    else:
        frappe.db.sql((u'rename    table    `tab%s`    to    `tab%s`' % (old, new)))
