migrations/Version20240919084832.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use App\Entity\Workflow\Action;
  5. use App\Repository\Workflow\ActionRepository;
  6. use Doctrine\DBAL\Schema\Schema;
  7. use Doctrine\Migrations\AbstractMigration;
  8. use Symfony\Component\DependencyInjection\ContainerAwareInterface;
  9. use Symfony\Component\DependencyInjection\ContainerAwareTrait;
  10. /**
  11.  * Auto-generated Migration: Please modify to your needs!
  12.  */
  13. final class Version2024091908483 extends AbstractMigration implements ContainerAwareInterface
  14. {
  15.     use ContainerAwareTrait;
  16.     public function getDescription(): string
  17.     {
  18.         return '';
  19.     }
  20.     // ACTION_SYSTEM_NOTIFICATION
  21.     public function up(Schema $schema): void
  22.     {
  23.         $entityManager $this->container->get('doctrine.orm.entity_manager');
  24.         /** @var ActionRepository $actionWorkflowRepository */
  25.         $actionWorkflowRepository $entityManager->getRepository(Action::class);
  26.         $actionSystemNotification $actionWorkflowRepository->findOneBy(['name' => 'ACTION_SYSTEM_NOTIFICATION']);
  27.         $entityManager->remove($actionSystemNotification);
  28.         $entityManager->flush();
  29.     }
  30.     public function down(Schema $schema): void
  31.     {
  32.         // this down() migration is auto-generated, please modify it to your needs
  33.     }
  34. }