<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240226022158 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$exists = $this->connection->fetchOne("SELECT count(*) FROM dtb_mail_template WHERE file_name = 'Mail/inquiry_mail.twig'");
if ($exists == 0) {
$this->addSql("
INSERT INTO dtb_mail_template (creator_id, name, file_name, mail_subject, create_date, update_date, discriminator_type)
VALUES (null, 'Inquiry Mail', 'Mail/inquiry_mail.twig', 'お問い合わせを受け付けました。', '2024-02-26 10:14:52', '2024-02-26 10:14:52', 'mailtemplate');");
}
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DELETE FROM dtb_mail_template WHERE file_name = ?', ["Mail/inquiry_mail.twig"]);
}
}