Piwik\FrontController::throwIfPiwikVersionIsOlderThanDBSchema PHP Method

throwIfPiwikVersionIsOlderThanDBSchema() private method

This method ensures that Piwik Platform cannot be running when using a NEWER database.
    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));
        }
    }