def drop_all_tables ( self ) : for table_name in self . table_names ( ) : self . execute_sql ( "DROP TABLE %s" % table_name ) self . connection . commit ( )
python mysql drop and recreate table
Drop all tables in the database
def drop_all_tables(self):
        """Drop all tables in the database"""
        for table_name in self.table_names():
            self.execute_sql("DROP TABLE %s" % table_name)
        self.connection.commit()