summaryrefslogtreecommitdiff
path: root/includes/install.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/install.inc')
-rw-r--r--includes/install.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/install.inc b/includes/install.inc
index e68e272d3..fd3ce35fb 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -349,6 +349,7 @@ abstract class DatabaseTasks {
}
abstract public function name();
+ abstract protected function minimumVersion();
/**
* Run database tasks and tests to see if Drupal can run on the database.
@@ -356,6 +357,9 @@ abstract class DatabaseTasks {
public function runTasks() {
// We need to establish a connection before we can run tests.
if ($this->connect()) {
+ if (version_compare(Database::getConnection()->version(), $this->minimumVersion()) < 0) {
+ throw new DatabaseTaskException(st("The database version %version is less than the minimum required version %minimum_version.", array('%version' => Database::getConnection()->version(), '%minimum_version' => $this->minimumVersion())));
+ }
foreach ($this->tasks as $task) {
if (!isset($task['function'])) {
$task['function'] = 'runTestQuery';