You are here

protected function DatabaseTasks::checkEngineVersion in Drupal 7

Check the engine version.

File

includes/install.inc, line 463
API functions for installing modules and themes.

Class

DatabaseTasks
Database installer structure.

Code

protected function checkEngineVersion() {
  if ($this
    ->minimumVersion() && version_compare(Database::getConnection()
    ->version(), $this
    ->minimumVersion(), '<')) {
    $this
      ->fail(st("The database version %version is less than the minimum required version %minimum_version.", array(
      '%version' => Database::getConnection()
        ->version(),
      '%minimum_version' => $this
        ->minimumVersion(),
    )));
  }
}