<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use App\Notification\AutochargeVipNotification;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20221006202890 extends AbstractMigration
{
public function getDescription(): string
{
return 'Update vip notification';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$text_email_no = '<p><a href="%link_to_avanti_customer%">%customer_number%</a> %user_name% skal faktureres for kjøp av <a href="%link_to_avanti_lot%">%lot_number%</a> %object_title%</p>';
$text_email_en = '<p><a href="%link_to_avanti_customer%">%customer_number%</a> %user_name% will be invoiced for the purchase of <a href="%link_to_avanti_lot%">%lot_number%</a> %object_title%</p>';
$this->addSql("UPDATE notification_template SET identifier = 'VIP_PAYMENT_PENDING_NOR', text_email = '{$text_email_no}' WHERE notification_type = '" . AutochargeVipNotification::TYPE . "' AND notification_language = 'nor-NO'");
$this->addSql("UPDATE notification_template SET identifier = 'VIP_PAYMENT_PENDING_ENG', text_email = '{$text_email_en}' WHERE notification_type = '" . AutochargeVipNotification::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>%customer_number% %user_name% skal faktureres for kjøp av %lot_number% %object_title%</p>';
$text_email_en = '<p>%customer_number% %user_name% will be invoiced for the purchase of %lot_number% %object_title%</p>';
$this->addSql("UPDATE notification_template SET identifier = 'PAYMENT_DONE_AUTOMATIC_VIPPS_NOR', text_email = '{$text_email_no}' WHERE notification_type = '" . AutochargeVipNotification::TYPE . "' AND notification_language = 'nor-NO'");
$this->addSql("UPDATE notification_template SET identifier = 'PAYMENT_DONE_AUTOMATIC_VIPPS_ENG', text_email = '{$text_email_en}' WHERE notification_type = '" . AutochargeVipNotification::TYPE . "' AND notification_language = 'eng-GB'");
}
}