Details
Description
On a 1.7 upgrade:
1146: Table 'moodletest.groups_courses_groupings' doesn't exist
ADOConnection._Execute(
SELECT gpgs.courseid, ggs.groupid
FROM groups_courses_groupings gpgs,
..., false) % line 889, file: adodb.inc.php
ADOConnection.Execute(
SELECT gpgs.courseid, ggs.groupid
FROM groups_courses_groupings gpgs,
...) % line 674, file: dmllib.php
get_recordset_sql(
SELECT gpgs.courseid, ggs.groupid
FROM groups_courses_groupings gpgs,
...) % line 58, file: upgrade.php
undo_groupings() % line 679, file: upgrade.php
xmldb_main_upgrade(2006101010) % line 322, file: index.php
I assume this is again related to the various other bugs because of groups being seperated from the core upgrade
I guss something like this would do it..
— /home/dan/tmp/cvs/moodle/lib/db/upgrade.php 2007-07-12 13:53:21.000000000 +0100
+++ 18/lib/db/upgrade.php 2007-07-12 15:10:09.000000000 +0100
@@ -672,7 +672,7 @@
}
if ($result && $oldversion < 2007021504) {
+ if ( table_exists(new XMLDBTable('groups_courses_groupings')) && empty($CFG->enablegroupings)) {
// delete all groupings - they do not work yet
// while keeping all existing groups
require_once("$CFG->dirroot/group/db/upgrade.php");