<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use App\Notification\AutomaticPaymentSuccessfullReceiptAttachedAsPDFNotification;
use App\Notification\PaymentReceiptReceiptAttachedAsPDFNotification;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20221006202849 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add objects table with payment info to payment notifications';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$text_email_no = '<p>Hei %user_name%</p><p>Takk for betaling. Detaljer om utlevering og forsendelse finner du her.</p> %receipt%';
$text_email_en = '<p>Dear %user_name%</p><p>Thank you for your payment. Please find your receipt attached. For details regarding collection and shipping, see here.</p> %receipt%';
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}' WHERE notification_type = '" . PaymentReceiptReceiptAttachedAsPDFNotification::TYPE . "' AND notification_language = 'nor-NO'");
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}' WHERE notification_type = '" . PaymentReceiptReceiptAttachedAsPDFNotification::TYPE . "' AND notification_language = 'eng-GB'");
$text_email_no = '<p>Hei %user_name%</p><p>Gratulerer med ditt kjøp hos Blomqvist. Automatisk betaling har blitt gjennomført med ditt lagrede kort. <a href="http://www.blomqvist.no/">Detaljer om utlevering og forsendelse finner du her.</a></p> %receipt%';
$text_email_en = '<p>Dear %user_name%</p><p>Congratulations with your purchase from Blomqvist. An automatic payment with your stored card has been made. Please find your receipt attached. For details regarding collection and shipping, see here.</p> %receipt%';
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}' WHERE notification_type = '" . AutomaticPaymentSuccessfullReceiptAttachedAsPDFNotification::TYPE . "' AND notification_language = 'nor-NO'");
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}' WHERE notification_type = '" . AutomaticPaymentSuccessfullReceiptAttachedAsPDFNotification::TYPE . "' AND notification_language = 'eng-GB'");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$text_email_no = '<p>Hei %user_name%</p><p>Takk for betaling. Detaljer om utlevering og forsendelse finner du her.</p>';
$text_email_en = '<p>Dear %user_name%</p><p>Thank you for your payment. Please find your receipt attached. For details regarding collection and shipping, see here.</p>';
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}' WHERE notification_type = '" . PaymentReceiptReceiptAttachedAsPDFNotification::TYPE . "' AND notification_language = 'nor-NO'");
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}' WHERE notification_type = '" . PaymentReceiptReceiptAttachedAsPDFNotification::TYPE . "' AND notification_language = 'eng-GB'");
$text_email_no = '<p>Hei %user_name%</p><p>Gratulerer med ditt kjøp hos Blomqvist. Automatisk betaling har blitt gjennomført med ditt lagrede kort. <a href="http://www.blomqvist.no/">Detaljer om utlevering og forsendelse finner du her.</a></p>';
$text_email_en = '<p>Dear %user_name%</p><p>Congratulations with your purchase from Blomqvist. An automatic payment with your stored card has been made. Please find your receipt attached. For details regarding collection and shipping, see here.</p>';
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}' WHERE notification_type = '" . AutomaticPaymentSuccessfullReceiptAttachedAsPDFNotification::TYPE . "' AND notification_language = 'nor-NO'");
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}' WHERE notification_type = '" . AutomaticPaymentSuccessfullReceiptAttachedAsPDFNotification::TYPE . "' AND notification_language = 'eng-GB'");
}
}