update_system_schema_requirements

update_system_schema_requirements()

Returns whether the minimum schema requirement has been satisfied.

Return value

array A requirements info array.

File

core/includes/update.inc, line 70
Drupal database update API.

Code

function update_system_schema_requirements() {
  $requirements = array();

  $system_schema = drupal_get_installed_schema_version('system');

  $requirements['minimum schema']['title'] = 'Minimum schema version';
  if ($system_schema >= \Drupal::CORE_MINIMUM_SCHEMA_VERSION) {
    $requirements['minimum schema'] += array(
      'value' => 'The installed schema version meets the minimum.',
      'description' => 'Schema version: ' . $system_schema,
    );
  }
  else {
    $requirements['minimum schema'] += array(
      'value' => 'The installed schema version does not meet the minimum.',
      'severity' => REQUIREMENT_ERROR,
      'description' => 'Your system schema version is ' . $system_schema . '. Updating directly from a schema version prior to 8000 is not supported. You must <a href="https://www.drupal.org/node/2179269">migrate your site to Drupal 8</a> first.',
    );
  }

  return $requirements;
}
doc_Drupal
2016-10-29 09:51:27
Comments
Leave a Comment

Please login to continue.