X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=blobdiff_plain;f=lib%2Fdb%2Fupgrade.php;h=72883b96f7c264b71078623b25bbddd4eb040a28;hp=a93050e75ee0b28bb3f61f92507cab0663d059b6;hb=57c3a358875365a76fd852c0e4a7f86cebcc1f82;hpb=92a119f53d49681942533c29692f4458882138bc diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index a93050e75ee..72883b96f7c 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1931,6 +1931,10 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); if ($result && $oldversion < 2009050615) { $table = new xmldb_table('block_instances'); + /// Arrived here, any block_instances record without blockname is one + /// orphan block coming from 1.9. Just delete them. MDL-22503 + $DB->delete_records_select('block_instances', 'blockname IS NULL'); + /// Changing nullability of field blockname on table block_instances to not null $field = new xmldb_field('blockname', XMLDB_TYPE_CHAR, '40', null, XMLDB_NOTNULL, null, null, 'id'); $dbman->change_field_notnull($table, $field);