MDL-24339 fix for old mysql invalid NULLs in resource popup field
This commit is contained in:
@@ -202,6 +202,10 @@ function resource_20_prepare_migration() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// fix invalid NULL popup data in old mysql databases
|
||||
$sql = "UPDATE {resource} SET popup = ? WHERE popup IS NULL";
|
||||
$DB->execute($sql, array($DB->sql_empty()));
|
||||
|
||||
// Adding fields to table resource_old
|
||||
$table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
|
||||
$table->add_field('course', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0');
|
||||
|
||||
Reference in New Issue
Block a user