MDL-46885 mod_forum: diverge version numbers
Before this patch the version number could dangerously clash with 27_STABLE increments - and miss the upgrade steps for MDL-1626
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
376a6f687c
commit
ba774b42a2
+17
-17
@@ -157,7 +157,22 @@ function xmldb_forum_upgrade($oldversion) {
|
||||
upgrade_mod_savepoint(true, 2014051201, 'forum');
|
||||
}
|
||||
|
||||
if ($oldversion < 2014051202) {
|
||||
if ($oldversion < 2014081500) {
|
||||
|
||||
// Define index course (not unique) to be added to forum_discussions.
|
||||
$table = new xmldb_table('forum_discussions');
|
||||
$index = new xmldb_index('course', XMLDB_INDEX_NOTUNIQUE, array('course'));
|
||||
|
||||
// Conditionally launch add index course.
|
||||
if (!$dbman->index_exists($table, $index)) {
|
||||
$dbman->add_index($table, $index);
|
||||
}
|
||||
|
||||
// Forum savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2014081500, 'forum');
|
||||
}
|
||||
|
||||
if ($oldversion < 2014081900) {
|
||||
|
||||
// Define table forum_discussion_subs to be created.
|
||||
$table = new xmldb_table('forum_discussion_subs');
|
||||
@@ -182,22 +197,7 @@ function xmldb_forum_upgrade($oldversion) {
|
||||
}
|
||||
|
||||
// Forum savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2014051202, 'forum');
|
||||
}
|
||||
|
||||
if ($oldversion < 2014081500) {
|
||||
|
||||
// Define index course (not unique) to be added to forum_discussions.
|
||||
$table = new xmldb_table('forum_discussions');
|
||||
$index = new xmldb_index('course', XMLDB_INDEX_NOTUNIQUE, array('course'));
|
||||
|
||||
// Conditionally launch add index course.
|
||||
if (!$dbman->index_exists($table, $index)) {
|
||||
$dbman->add_index($table, $index);
|
||||
}
|
||||
|
||||
// Forum savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2014081500, 'forum');
|
||||
upgrade_mod_savepoint(true, 2014081900, 'forum');
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2014081500; // The current module version (Date: YYYYMMDDXX)
|
||||
$plugin->version = 2014081900; // The current module version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2014050800; // Requires this Moodle version
|
||||
$plugin->component = 'mod_forum'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->cron = 60;
|
||||
|
||||
Reference in New Issue
Block a user