Skip to content
Browse files

Merge branch 'MDL-29620-workshop-sequence_20_STABLE' of git://github.…

…com/mudrd8mz/moodle into MOODLE_20_STABLE
  • Loading branch information...
2 parents e293df9 + 562c3f7 commit 41752c58bc12661e9ca97615303174678a03fbf8 @nebgor nebgor committed Nov 9, 2011
Showing with 11 additions and 1 deletion.
  1. +8 −0 mod/workshop/db/upgrade.php
  2. +2 −0 mod/workshop/db/upgradelib.php
  3. +1 −1 mod/workshop/version.php
View
8 mod/workshop/db/upgrade.php
@@ -308,5 +308,13 @@ function xmldb_workshop_upgrade($oldversion) {
upgrade_mod_savepoint(true, 2011021100, 'workshop');
}
+ /**
+ * Fix the eventually corrupted workshop table id sequence
+ */
+ if ($oldversion < 2011030401) {
+ $dbman->reset_sequence('workshop');
+ upgrade_mod_savepoint(true, 2011030401, 'workshop');
+ }
+
return true;
}
View
2 mod/workshop/db/upgradelib.php
@@ -163,6 +163,8 @@ function workshop_upgrade_module_instances() {
$DB->set_field('workshop_old', 'newid', $new->id, array('id' => $old->id));
}
$rs->close();
+ $dbman = $DB->get_manager();
+ $dbman->reset_sequence('workshop');
}
/**
View
2 mod/workshop/version.php
@@ -29,6 +29,6 @@
defined('MOODLE_INTERNAL') || die();
-$module->version = 2011030400;
+$module->version = 2011030401;
$module->requires = 2011020900; // Requires this Moodle version
//$module->cron = 60;

0 comments on commit 41752c5

Please sign in to comment.
Something went wrong with that request. Please try again.