Perform Drupal 7.x to 8.x updates that are required for update.php to function properly.
This function runs when update.php is run the first time for 8.x, even before updates are selected or performed. It is important that if updates are not ultimately performed that no changes are made which make it impossible to continue using the prior version.
function update_fix_d8_requirements() {
global $conf;
if (drupal_get_installed_schema_version('system') < 8000 && !update_variable_get('update_d8_requirements', FALSE)) {
// Make sure that file.module is enabled as it is required for the user
// picture upgrade path.
update_module_enable(array(
'file',
));
update_variable_set('update_d8_requirements', TRUE);
}
}