<?php
declare(strict_types=1);
namespace Wbfk\ProductLinks;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Exception;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
class WbfkProductLinks extends Plugin
{
public function uninstall(UninstallContext $uninstallContext): void
{
parent::uninstall($uninstallContext);
if ($uninstallContext->keepUserData()) {
return;
}
// todo: Enable after release, maybe. This is a dangerous thing...
return;
$this->removeMigrations();
/** @var Connection $connection */
$connection = $this->container->get(Connection::class);
try {
$connection->executeStatement('DROP TABLE IF EXISTS `wbfk_product_link`');
} catch (Exception $e) {
}
}
}