blocks upgrade: MDL-19511 Oops. contextid is unsigned, so use 0 as a dummy value, not -1

This commit is contained in:
tjhunt 2009-10-04 18:20:08 +00:00
parent 85879df923
commit bf659cf05e

View File

@ -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);