<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use App\Notification\BankCardExpiresSoonNotification;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220711204222 extends AbstractMigration
{
public function getDescription(): string
{
return 'Updated name in BankCardExpiresSoonNotification';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$text_email_no = "%header% <p>Hei %user_name%</p> <p>Ditt lagrede kort hos oss utløper snart. Utløsdato %expiration_date%.</p> <p>For å kunne by på våre auksjoner må du ha et gyldig kort lagret hos oss. Du kan oppdatere dine kortdetaljer på <u>Min Side</u> på Blomqvist.no</p> <p>Si ifra om det er noe annet Blomqvist kan hjelpe deg med.</p> %footer%";
$text_email_en = "%header% <p>Hei %user_name%</p> <p>Your stored payment card is about to expire. Expiration date %expiration_date%</p> <p>To bid in our auctions you must have a valid payment card stored. Your can updated your payment details on My page on Blomqvist.no</p> <p>Let us know if there is anything we can do for you.</p> %footer%";
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}' WHERE notification_type = " . BankCardExpiresSoonNotification::TYPE . " AND notification_language = 'nor-NO'");
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}' WHERE notification_type = " . BankCardExpiresSoonNotification::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 = "%header% <p>Hei %user_first_name% %user_last_name%</p> <p>Ditt lagrede kort hos oss utløper snart. Utløsdato %expiration_date%.</p> <p>For å kunne by på våre auksjoner må du ha et gyldig kort lagret hos oss. Du kan oppdatere dine kortdetaljer på <u>Min Side</u> på Blomqvist.no</p> <p>Si ifra om det er noe annet Blomqvist kan hjelpe deg med.</p> %footer%";
$text_email_en = "%header% <p>Hei %user_first_name% %user_last_name%</p> <p>Your stored payment card is about to expire. Expiration date %expiration_date%</p> <p>To bid in our auctions you must have a valid payment card stored. Your can updated your payment details on My page on Blomqvist.no</p> <p>Let us know if there is anything we can do for you.</p> %footer%";
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}', `subject` = NULL WHERE notification_type = " . BankCardExpiresSoonNotification::TYPE . " AND notification_language = 'nor-NO'");
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}', `subject` = NULL WHERE notification_type = " . BankCardExpiresSoonNotification::TYPE . " AND notification_language = 'eng-GB'");
}
}