private static void insertMappingtables(DBConnection connection, List<ExtendedField> manyToMany, List<String> tables) throws SQLException {
        for (ExtendedField mapTab : manyToMany) {
            String mapTabName = mapTab.getMappingTable();
            
            Column columnTabA = buildMappingColumn(DaoUtils.getTableName(mapTab.getMappedType()), mapTabName);
            Column columnTabB = buildMappingColumn(mapTab.getTableName(), mapTabName);
            
            if(!tables.contains(mapTabName.toUpperCase())){
                String query = "CREATE TABLE " + DB.ESCAPE + mapTabName + DB.ESCAPE
                    + " ("+columnTabA.getCreateStatement()+","+columnTabB.getCreateStatement()+")";
                Loggin.logQuery(connection, query);
        
                Statement statement = connection.getStatement();
                statement.executeUpdate(query);
                statement.close();
            }else{
                List<ColumnInfo> existing = getColumnsOnTable(connection, mapTabName);

                columnTabA.setExistings(existing);
                if (columnTabA.isAlterNeeded()) {
                    String query = columnTabA.getAlterStatement();
                    Loggin.logQuery(connection, query);
        
                    Statement statement = connection.getStatement();
                    statement.executeUpdate(query);
                    statement.close();
                }
                
                columnTabB.setExistings(existing);
                if (columnTabB.isAlterNeeded()) {
                    String query = columnTabB.getAlterStatement();
                    Loggin.logQuery(connection, query);
        
                    Statement statement = connection.getStatement();
                    statement.executeUpdate(query);
                    statement.close();
                }
            }
        }

    }