app/DoctrineMigrations/Version20230515023836.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4. * This file is part of EC-CUBE
  5. *
  6. * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  7. *
  8. * http://www.ec-cube.co.jp/
  9. *
  10. * For the full copyright and license information, please view the LICENSE
  11. * file that was distributed with this source code.
  12. */
  13. namespace DoctrineMigrations;
  14. use Doctrine\DBAL\Schema\Schema;
  15. use Doctrine\Migrations\AbstractMigration;
  16. /**
  17. * Auto-generated Migration: Please modify to your needs!
  18. */
  19. final class Version20230515023836 extends AbstractMigration
  20. {
  21. public function up(Schema $schema): void
  22. {
  23. $exists = $this->connection->fetchOne("SELECT count(*) FROM dtb_mail_template WHERE file_name = 'Mail/customer_change_notify.twig'");
  24. if ($exists == 0) {
  25. $this->addSql("
  26. INSERT INTO dtb_mail_template (creator_id, name, file_name, mail_subject, create_date, update_date, discriminator_type)
  27. VALUES (null, '会員情報変更通知メール', 'Mail/customer_change_notify.twig', '会員情報変更のお知らせ', '2017-03-07 10:14:52', '2017-03-07 10:14:52', 'mailtemplate');");
  28. }
  29. }
  30. public function down(Schema $schema): void
  31. {
  32. // this down() migration is auto-generated, please modify it to your needs
  33. }
  34. }