MDL-18132 - fix upgrade SQL for MS SQL.
authortjhunt <tjhunt>
Tue, 28 Apr 2009 09:55:46 +0000 (09:55 +0000)
committertjhunt <tjhunt>
Tue, 28 Apr 2009 09:55:46 +0000 (09:55 +0000)
lib/db/upgrade.php

index bcda99f8337c0600ecdce612b1c940d60e683585..9100388e2b10bc50103be35f8f75e3b8df637e21 100644 (file)
@@ -1527,7 +1527,8 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
 
     if ($result && $oldversion < 2009032001) {
     /// Copy from role_allow_assign into the new table.
-        $DB->execute('INSERT INTO {role_allow_switch} SELECT * FROM {role_allow_assign}');
+        $DB->execute('INSERT INTO {role_allow_switch} (roleid, allowswitch)
+                SELECT roleid, allowassign FROM {role_allow_assign}');
 
     /// Unset the config variable used in 1.9.
         unset_config('allowuserswitchrolestheycantassign');