<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use App\Entity\Notification\NotificationArea;
use App\Repository\Notification\NotificationAreaRepository;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240911123506DataUpdate extends AbstractMigration implements ContainerAwareInterface
{
use ContainerAwareTrait;
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$entityManager = $this->container->get('doctrine.orm.entity_manager');
/** @var NotificationAreaRepository $notificationAreaRepository */
$notificationAreaRepository = $entityManager->getRepository(NotificationArea::class);
$newComment = $notificationAreaRepository->getNotificationAreaCommentNew();
$newComment->setVisibleName('New Comment');
$entityManager->persist($newComment);
$entityManager->flush();
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
}
}