mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
blocks upgrade: MDL-19511 Oops. contextid is unsigned, so use 0 as a dummy value, not -1
This commit is contained in:
parent
85879df923
commit
bf659cf05e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user