Core/ModuleStateFixer.php
protected function _addModuleVersion($sModuleVersion, $sModuleId)
    {
        $aVersions = (array) Registry::getConfig()->getConfigParam('aModuleVersions');
        $old =  isset($aVersions[$sModuleId]) ? $aVersions[$sModuleId] : '';
        if (isset($sModuleVersion)) {
            if ($old !== $sModuleVersion) {
                $aVersions[$sModuleId] = $sModuleVersion;
                if($old == '') {
                    $this->output->info("register module '$sModuleId' with version $sModuleVersion");
                } else {
                    $this->output->warning("$sModuleId fixing module version from $old to $sModuleVersion");
                }
                $this->_saveToConfig('aModuleVersions', $aVersions);
                $this->needCacheClear = true;
            }
        } else {
            if ($old) {
                $this->output->info("$sModuleId unregister module version");
                $this->_deleteModuleVersions($sModuleId);
                $this->needCacheClear = true;
            }
        }

    }
protected function _addModuleVersion($sModuleVersion, $sModuleId)
    {
        $aVersions = (array) Registry::getConfig()->getConfigParam('aModuleVersions');
        $old =  isset($aVersions[$sModuleId]) ? $aVersions[$sModuleId] : '';
        if (isset($sModuleVersion)) {
            if ($old !== $sModuleVersion) {
                $aVersions[$sModuleId] = $sModuleVersion;
                if($old == '') {
                    $this->output->info("register module '$sModuleId' with version $sModuleVersion");
                } else {
                    $this->output->warning("$sModuleId fixing module version from $old to $sModuleVersion");
                }
                $this->_saveToConfig('aModuleVersions', $aVersions);
                $this->needCacheClear = true;
            }
        } else {
            if ($old) {
                $this->output->info("$sModuleId unregister module version");
                $this->_deleteModuleVersions($sModuleId);
                $this->needCacheClear = true;
            }
        }

    }
Add module version to config.

@param string $sModuleVersion Module version
@param string $sModuleId      Module id