File "migration.php"
Full Path: /home/analogde/www/download/CHESS_2022/migration.php
File size: 1.46 KB
MIME-type: text/x-php
Charset: utf-8
<?php
session_start();
include('database.php');
DB_connexion();
/*************************************************************************************/
/// copy pour la migration vers la nouvelle version
$old_table_chessmaster = "chessmaster";
$old_table_parties = "parties";
$old_table_classement = "classement";
$old_table_evolution = "evolution";
$new_table_chessmaster = "chessmaster_new";
$new_table_parties = "parties_new";
$new_table_classement = "classement_new";
$new_table_evolution = "evolution_new";
/*
$sql = "CREATE TABLE " .$new_table_chessmaster ." LIKE " .$old_table_chessmaster;
mysql_query($sql);
$sql = "INSERT INTO " .$new_table_chessmaster ." SELECT * FROM " .$old_table_chessmaster;
mysql_query($sql);
$sql = "CREATE TABLE " .$new_table_parties ." LIKE " .$old_table_parties;
mysql_query($sql);
$sql = "INSERT INTO " .$new_table_parties ." SELECT * FROM " .$old_table_parties;
mysql_query($sql);
$sql = "CREATE TABLE " .$new_table_classement ." LIKE " .$old_table_classement;
mysql_query($sql);
$sql = "INSERT INTO " .$new_table_classement ." SELECT * FROM " .$old_table_classement;
mysql_query($sql);
*/
$sql = "CREATE TABLE " .$new_table_evolution ." LIKE " .$old_table_evolution;
mysql_query($sql);
$sql = "INSERT INTO " .$new_table_evolution ." SELECT * FROM " .$old_table_evolution;
mysql_query($sql);
echo "migration finished";
echo "<br>";
?>