private function getUpgradeRepository()
    {
        $upgradeFile = $this->getTensideDataDir() . DIRECTORY_SEPARATOR . 'upgrades.json';
        if (!file_exists($upgradeFile)) {
            return null;
        }

        $packageLoader  = new ArrayLoader();
        $packageChanges = new WritableArrayRepository();
        $upgrades       = new JsonFile($upgradeFile, null);
        foreach ($upgrades->getEntries('/') as $packageName) {
            if ($pkgData = $upgrades->get($packageName . '/target')) {
                $packageChanges->addPackage($packageLoader->load($pkgData));
            }
        }

        return $packageChanges;
    }