Пример #1
0
            throw new Exception("upgrade::setTRStoFloat(): " . $this->conn->error);
        }
        $res = $rs->fetch_array(MYSQLI_ASSOC);
        if (strpos($res['data_type'], 'int') === false) {
            return 0;
        }
        // already done
        // not done: change every TRS/TRM field to float
        foreach ($cmds as $query) {
            $this->conn->query($query);
        }
        return 0;
    }
}
$upg = new Updater();
if ($upg->slaveMode() == true) {
    return;
}
// restricted mode. do not try to update database anyway
try {
    $upg->removeUpdateMark();
    $upg->updateVersionHistory();
    $upg->updatePerroGuiaClub();
    $upg->addCountries();
    $upg->addColumnUnlessExists("Mangas", "Orden_Equipos", "TEXT");
    $upg->addColumnUnlessExists("Resultados", "TIntermedio", "double", "0.0");
    $upg->addColumnUnlessExists("Resultados", "Games", "int(4)", 0);
    $upg->addColumnUnlessExists("Perros", "NombreLargo", "varchar(255)");
    $upg->addColumnUnlessExists("Perros", "Genero", "varchar(16)");
    $upg->addColumnUnlessExists("Provincias", "Pais", "varchar(2)", "ES");
    $upg->updateInscripciones();