diff --git a/db/upgrade.php b/db/upgrade.php index b046d7b..d565d81 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -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); } diff --git a/version.php b/version.php index 2dc8a42..41646e6 100644 --- a/version.php +++ b/version.php @@ -35,10 +35,10 @@ if (!isset( $plugin)) { } $plugin->component = 'mod_game'; // Full name of the plugin (used for diagnostics). -$plugin->version = 2017062702; // The current module version (Date: YYYYMMDDXX). +$plugin->version = 2017062801; // The current module version (Date: YYYYMMDDXX). $plugin->requires = 2010112400; // Requires Moodle 2.0. $plugin->cron = 0; // Period for cron to check this module (secs). -$plugin->release = '2017-06-27'; +$plugin->release = '2017-06-28'; $plugin->maturity = MATURITY_STABLE; if ($useplugin != 2) {