|
|
@ -1581,7 +1581,7 @@ function xmldb_game_upgrade($oldversion) { |
|
|
|
$dbman->change_field_type($table, $field); |
|
|
|
} |
|
|
|
|
|
|
|
if ($oldversion < ($ver = 2017062701)) { |
|
|
|
if ($oldversion < ($ver = 2017062801)) { |
|
|
|
$table = new xmldb_table('game_cross'); |
|
|
|
$field = new xmldb_field('usedrows', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0', 'id'); |
|
|
|
if (!$dbman->field_exists($table, $field)) { |
|
|
@ -1591,13 +1591,12 @@ function xmldb_game_upgrade($oldversion) { |
|
|
|
$field = new xmldb_field('rows', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0', 'id'); |
|
|
|
if ($dbman->field_exists($table, $field)) { |
|
|
|
mpgame_db_copy_string_to_int( 'game_cross', 'rows', 'usedrows'); |
|
|
|
$dbman->drop_field($table, $field); |
|
|
|
} else { |
|
|
|
$dbman->add_field($table, $field); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($oldversion < ($ver = 2017062701)) { |
|
|
|
if ($oldversion < ($ver = 2017062801)) { |
|
|
|
$table = new xmldb_table('game_cross'); |
|
|
|
$field = new xmldb_field('usedcols', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0', 'id'); |
|
|
|
if (!$dbman->field_exists($table, $field)) { |
|
|
@ -1607,13 +1606,12 @@ function xmldb_game_upgrade($oldversion) { |
|
|
|
$field = new xmldb_field('cols', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0', 'id'); |
|
|
|
if ($dbman->field_exists($table, $field)) { |
|
|
|
mpgame_db_copy_string_to_int( 'game_cross', 'cols', 'usedcols'); |
|
|
|
$dbman->drop_field($table, $field); |
|
|
|
} else { |
|
|
|
$dbman->add_field($table, $field); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($oldversion < ($ver = 2017062701)) { |
|
|
|
if ($oldversion < ($ver = 2017062801)) { |
|
|
|
$table = new xmldb_table('game_snakes_database'); |
|
|
|
$field = new xmldb_field('usedrows', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0', 'id'); |
|
|
|
if (!$dbman->field_exists($table, $field)) { |
|
|
@ -1623,13 +1621,12 @@ function xmldb_game_upgrade($oldversion) { |
|
|
|
$field = new xmldb_field('rows', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0', 'id'); |
|
|
|
if ($dbman->field_exists($table, $field)) { |
|
|
|
mpgame_db_copy_string_to_int( 'game_snakes_database', 'rows', 'usedrows'); |
|
|
|
$dbman->drop_field($table, $field); |
|
|
|
} else { |
|
|
|
$dbman->add_field($table, $field); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($oldversion < ($ver = 2017062701)) { |
|
|
|
if ($oldversion < ($ver = 2017062801)) { |
|
|
|
$table = new xmldb_table('game_snakes_database'); |
|
|
|
$field = new xmldb_field('usedcols', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0', 'id'); |
|
|
|
if (!$dbman->field_exists($table, $field)) { |
|
|
@ -1639,7 +1636,6 @@ function xmldb_game_upgrade($oldversion) { |
|
|
|
$field = new xmldb_field('cols', XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, null, null, '0', 'id'); |
|
|
|
if ($dbman->field_exists($table, $field)) { |
|
|
|
mpgame_db_copy_string_to_int( 'game_snakes_database', 'cols', 'usedcols'); |
|
|
|
$dbman->drop_field($table, $field); |
|
|
|
} else { |
|
|
|
$dbman->add_field($table, $field); |
|
|
|
} |
|
|
|