private function throwIfPiwikVersionIsOlderThanDBSchema()
{
// When developing this situation happens often when switching branches
if (Development::isEnabled()) {
return;
}
$updater = new Updater();
$dbSchemaVersion = $updater->getCurrentComponentVersion('core');
$current = Version::VERSION;
if (-1 === version_compare($current, $dbSchemaVersion)) {
$messages = array(Piwik::translate('General_ExceptionDatabaseVersionNewerThanCodebase', array($current, $dbSchemaVersion)), Piwik::translate('General_ExceptionDatabaseVersionNewerThanCodebaseWait'), Piwik::translate('General_ExceptionContactSupportGeneric', array('', '')));
throw new DatabaseSchemaIsNewerThanCodebaseException(implode(" ", $messages));
}
}