migrations/Version20240612104034DataUpdate.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use App\Entity\ActiveServices\Project;
  5. use App\Entity\Notification\NotificationArea;
  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 Version20240612104034DataUpdate extends AbstractMigration implements ContainerAwareInterface
  14. {
  15.     use ContainerAwareTrait;
  16.     public function getDescription(): string
  17.     {
  18.         return '';
  19.     }
  20.     public function up(Schema $schema): void
  21.     {
  22.         /** @var EntityManagerInterface $entityManger */
  23.         $entityManager $this->container->get('doctrine.orm.entity_manager');
  24.         $newNotificationAreaCommentUserTag = new NotificationArea(
  25.             NotificationArea::WORKFLOW_NOTIFICATION,
  26.             'Workflow notification',
  27.             'projects',
  28.         );
  29.         $entityManager->persist($newNotificationAreaCommentUserTag);
  30.         $entityManager->flush();
  31.     }
  32. }