<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use App\Entity\Workflow\MailTag;
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 Version20240912134532DataUpdate 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');
$newMailTag = (new MailTag())
->setName(MailTag::MAIL_TAG_COUNTRY)
->setVisibleName('[@country]')
->setDescription('Show client\'s country.');
$entityManager->persist($newMailTag);
$entityManager->flush();
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
}
}