]> git.mjollnir.org Git - moodle.git/commitdiff
blocks upgrade: MDL-19511 Oops. contextid is unsigned, so use 0 as a dummy value...
authortjhunt <tjhunt>
Sun, 4 Oct 2009 18:20:08 +0000 (18:20 +0000)
committertjhunt <tjhunt>
Sun, 4 Oct 2009 18:20:08 +0000 (18:20 +0000)
lib/db/upgrade.php

index 896b657cbd2eed18b62a850ad2e2f6945e9313e4..c8e20eacfdb50d81998a1b930faeff1f761c30ed 100644 (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);