<?php
namespace Crehler\ListingBanner;
use Doctrine\DBAL\Connection;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
class CrehlerListingBanner extends Plugin
{
public function uninstall(UninstallContext $uninstallContext): void
{
if($uninstallContext->keepUserData()){
parent::uninstall($uninstallContext);
return;
}
$connection = $this->container->get(Connection::class);
$connection->executeUpdate('DROP TABLE IF EXISTS `crehler_banner_media`');
$connection->executeUpdate('DROP TABLE IF EXISTS `crehler_category_banner`');
$connection->executeUpdate('DROP TABLE IF EXISTS `crehler_banner`');
}
}