<?php declare(strict_types=1);
namespace EnnoDigitalProducts;
use Doctrine\DBAL\Connection;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
class EnnoDigitalProducts extends Plugin
{
public function uninstall(UninstallContext $context): void
{
parent::uninstall($context);
if ($context->keepUserData()) {
return;
}
$connection = $this->container->get(Connection::class);
$connection->executeStatement('DROP TABLE IF EXISTS `enno_digital_product_settings`');
$connection->executeStatement('DROP TABLE IF EXISTS `enno_download_log`');
$connection->executeStatement('DROP TABLE IF EXISTS `enno_download_translation`');
$connection->executeStatement('DROP TABLE IF EXISTS `enno_download`');
$connection->executeStatement('DROP TABLE IF EXISTS `enno_download_set_product_relations`');
$connection->executeStatement('DROP TABLE IF EXISTS `enno_download_set_translation`');
$connection->executeStatement('DROP TABLE IF EXISTS `enno_download_set`');
}
}