You are here

function update_system_schema_requirements in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/includes/update.inc \update_system_schema_requirements()

Returns whether the minimum schema requirement has been satisfied.

Return value

array A requirements info array.

1 call to update_system_schema_requirements()
update_check_requirements in core/includes/update.inc
Checks update requirements and reports errors and (optionally) warnings.

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;
}