<?php declare(strict_types=1);
namespace PixupCheapestPrice;
use Doctrine\DBAL\Connection;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
class PixupCheapestPrice extends Plugin
{
public function uninstall(UninstallContext $uninstallContext): void
{
parent::uninstall($uninstallContext);
if ($uninstallContext->keepUserData()) {
return;
}
// Remove or deactivate the data created by the plugin
$connection = $this->container->get(Connection::class);
$connection->executeStatement('DROP TABLE IF EXISTS `pixup_cheapest_price_product`');
$connection->executeStatement('DROP TABLE IF EXISTS `pixup_cheapest_price_product_price`');
$connection->executeStatement('DROP TABLE IF EXISTS `product_cheapest_price`');
}
}