blocks upgrade: MDL-19511 Oops. contextid is unsigned, so use 0 as a dummy value, not -1
This commit is contained in:
+1
-1
@@ -1993,7 +1993,7 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
|
||||
|
||||
if ($result && $oldversion < 2009050614) {
|
||||
/// fill in any missing contextids with a dummy value, so we can add the not-null constraint.
|
||||
$DB->execute("UPDATE {block_instances} SET contextid = -1 WHERE contextid IS NULL");
|
||||
$DB->execute("UPDATE {block_instances} SET contextid = 0 WHERE contextid IS NULL");
|
||||
|
||||
/// Main savepoint reached
|
||||
upgrade_main_savepoint($result, 2009050614);
|
||||
|
||||
Reference in New Issue
Block a user