<?php
declare(strict_types=1);
/**
* PremSoft
* Copyright © 2019 Premsoft - Sven Mittreiter
*
* @copyright Copyright (c) 2019, premsoft - Sven Mittreiter (http://www.premsoft.de)
* @author Sven Mittreiter <info@premsoft.de>
*/
namespace Prems\Plugin\PremsWishlist;
use Doctrine\DBAL\Connection;
use Prems\Plugin\PremsWishlist\ScheduledTask\CleanupWishlistsTask;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
class PremsWishlist 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 `prems_wishlist_product`');
$connection->executeStatement('DROP TABLE IF EXISTS `prems_wishlist`');
$connection->executeStatement('DELETE FROM scheduled_task where `name` = ?', [CleanupWishlistsTask::getTaskName()]);
}
}