Skip to content

Commit

Permalink
Fix change type of game_cross
Browse files Browse the repository at this point in the history
  • Loading branch information
bdaloukas committed Jun 26, 2016
1 parent ac3a488 commit 2b2d80c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Changes in version 2016-06-26 (20160626)
- Change type of game_cross.createscore to double

Changes in version 2016-06-14 (20160614)
- Fix Moodle 31 compatibility

Expand Down
6 changes: 3 additions & 3 deletions db/install.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="mod/game/db" VERSION="20160614" COMMENT="XMLDB file for Moodle mod/game"
<XMLDB PATH="mod/game/db" VERSION="20160626" COMMENT="XMLDB file for Moodle mod/game"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
>
Expand Down Expand Up @@ -144,7 +144,7 @@
<FIELD NAME="rows" TYPE="int" LENGTH="3" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="words" TYPE="int" LENGTH="3" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="wordsall" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="createscore" TYPE="int" LENGTH="3" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="createscore" TYPE="float" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="createtries" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="createtimelimit" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="createconnectors" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
Expand Down Expand Up @@ -354,4 +354,4 @@
</INDEXES>
</TABLE>
</TABLES>
</XMLDB>
</XMLDB>
10 changes: 10 additions & 0 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -1544,5 +1544,15 @@ function xmldb_game_upgrade($oldversion) {

upgrade_mod_savepoint(true, $ver, 'game');
}

if ($oldversion < ($ver = 2016062603)) {
$table = new xmldb_table('game_cross');
$field = new xmldb_field('createscore', XMLDB_TYPE_FLOAT, null, null, XMLDB_NOTNULL, null, '0');

// Launch change of type for field thisfield
$dbman->change_field_type($table, $field);
}


return true;
}
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
}

$plugin->component = 'mod_game'; // Full name of the plugin (used for diagnostics).
$plugin->version = 2016061403; // The current module version (Date: YYYYMMDDXX).
$plugin->version = 2016062603; // 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 = '2016-06-14';
$plugin->release = '2016-06-26';

if ($useplugin != 2) {
$module = $plugin;
Expand Down

0 comments on commit 2b2d80c

Please sign in to comment.