<?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 Version20260305132549 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// Template 1000: 注文キャンセルメール
$exists1000 = $this->connection->fetchOne("SELECT count(*) FROM dtb_mail_template WHERE id = 1000");
if ($exists1000 == 0) {
$this->addSql("
INSERT INTO dtb_mail_template (id, creator_id, name, file_name, mail_subject, footer, create_date, update_date, discriminator_type)
VALUES (1000, null, '注文キャンセル受付メール', 'Mail/order_cancel.twig', 'ご注文キャンセルのご連絡', '■お問い合わせ -----------------------------------------------------------
ご不明な点がございましたら、お気軽にお問い合わせください。
【ワードレコーズ・ダイレクト】
[販売業者] 株式会社ワードレコーズ
[URL] http://wardrecords.com
[E-Mail] shopmaster@wardrecords.com
※土日祝祭日にいただいたメールでのお問い合わせの返信は翌営業日となります。', NOW(), NOW(), 'mailtemplate');");
}
// Template 1001: 出荷通知メール (通常)
$exists1001 = $this->connection->fetchOne("SELECT count(*) FROM dtb_mail_template WHERE id = 1001");
if ($exists1001 == 0) {
$this->addSql("
INSERT INTO dtb_mail_template (id, creator_id, name, file_name, mail_subject, create_date, update_date, discriminator_type)
VALUES (1001, null, '出荷通知メール(クレジットカード)', 'Mail/shipping_notify_standard.twig', '商品発送のお知らせ', NOW(), NOW(), 'mailtemplate');");
}
// Template 1002: 出荷通知メール (GMO後払い)
$exists1002 = $this->connection->fetchOne("SELECT count(*) FROM dtb_mail_template WHERE id = 1002");
if ($exists1002 == 0) {
$this->addSql("
INSERT INTO dtb_mail_template (id, creator_id, name, file_name, mail_subject, create_date, update_date, discriminator_type)
VALUES (1002, null, '出荷通知メール(後払い)', 'Mail/shipping_notify_gmo.twig', '商品発送のお知らせ', NOW(), NOW(), 'mailtemplate');");
}
// Template 1003: 出荷通知メール (代金引換)
$exists1003 = $this->connection->fetchOne("SELECT count(*) FROM dtb_mail_template WHERE id = 1003");
if ($exists1003 == 0) {
$this->addSql("
INSERT INTO dtb_mail_template (id, creator_id, name, file_name, mail_subject, create_date, update_date, discriminator_type)
VALUES (1003, null, '出荷通知メール(代金引換)', 'Mail/shipping_notify_cod.twig', '商品発送のお知らせ', NOW(), NOW(), 'mailtemplate');");
}
}
public function down(Schema $schema): void
{
$this->addSql("DELETE FROM dtb_mail_template WHERE file_name IN ('Mail/order_cancel.twig', 'Mail/shipping_notify_standard.twig', 'Mail/shipping_notify_gmo.twig', 'Mail/shipping_notify_cod.twig');");
}
}