'Rename a table.
If any fields reference that table, they will be handled too.
@param tablename_old : name of the original table before renaming
@param tablename_new : name of the table after renaming'

def rename_table(self, tablename_old, tablename_new):

    try:
        sql = ('ALTER    TABLE    %s    RENAME    TO    %s;' % (tablename_old, tablename_new))
        self.db.executesql(sql)
    except Exception as e:
        print e
