Loading src/FieldTypeUpdateUtil.php +13 −1 Original line number Diff line number Diff line Loading @@ -178,9 +178,21 @@ class FieldTypeUpdateUtil { // Restore the data. foreach ($tables as $table) { if ( !isset($existing_data[$table]) || !is_array($existing_data[$table]) || !count($existing_data[$table]) ) { continue; } $last_row = end($existing_data[$table]); if ($last_row == false) { continue; } $fields = array_keys($last_row); $insert_query = $database ->insert($table) ->fields(array_keys(end($existing_data[$table]))); ->fields($fields); foreach ($existing_data[$table] as $row) { $insert_query->values(array_values($row)); } Loading Loading
src/FieldTypeUpdateUtil.php +13 −1 Original line number Diff line number Diff line Loading @@ -178,9 +178,21 @@ class FieldTypeUpdateUtil { // Restore the data. foreach ($tables as $table) { if ( !isset($existing_data[$table]) || !is_array($existing_data[$table]) || !count($existing_data[$table]) ) { continue; } $last_row = end($existing_data[$table]); if ($last_row == false) { continue; } $fields = array_keys($last_row); $insert_query = $database ->insert($table) ->fields(array_keys(end($existing_data[$table]))); ->fields($fields); foreach ($existing_data[$table] as $row) { $insert_query->values(array_values($row)); } Loading