From bf659cf05e63614055e0de034273a3e2bd446526 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Sun, 4 Oct 2009 18:20:08 +0000 Subject: [PATCH] blocks upgrade: MDL-19511 Oops. contextid is unsigned, so use 0 as a dummy value, not -1 --- lib/db/upgrade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 896b657cbd..c8e20eacfd 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -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); -- 2.39.5