private function upgradeNode(NodeInterface $node, $locale, array $properties, $addScheme)
    {
        /** @var BasePageDocument $document */
        $document = $this->documentManager->find($node->getIdentifier(), $locale);
        $documentLocales = $this->documentInspector->getLocales($document);

        if (!in_array($locale, $documentLocales)) {
            return;
        }

        foreach ($properties as $property) {
            $propertyValue = $document->getStructure()->getProperty($property['property']->getName());

            if ($property['property'] instanceof BlockMetadata) {
                $this->upgradeBlockProperty($property['property'], $property['components'], $propertyValue, $addScheme);
            } else {
                $this->upgradeProperty($propertyValue, $addScheme);
            }
        }

        $this->documentManager->persist($document, $locale, ['auto_name' => false]);
    }