MDL-59583 dml: improve perfs by unsetting the key.

This commit is contained in:
Matteo Scaramuccia 2017-07-25 09:06:18 +02:00
parent 229ae617c5
commit dae6c5dc31

View File

@ -715,7 +715,7 @@ class mysqli_native_moodle_database extends moodle_database {
$rawcolumn->numeric_scale = null;
$rawcolumn->is_nullable = $rawcolumn->null; unset($rawcolumn->null);
$rawcolumn->column_default = $rawcolumn->default; unset($rawcolumn->default);
$rawcolumn->column_key = $rawcolumn->key; unset($rawcolumn->default);
$rawcolumn->column_key = $rawcolumn->key; unset($rawcolumn->key);
if (preg_match('/(enum|varchar)\((\d+)\)/i', $rawcolumn->column_type, $matches)) {
$rawcolumn->data_type = $matches[1];