<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use App\Notification\UserProfileIsUpdatedNotification;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220516201502 extends AbstractMigration
{
public function getDescription(): string
{
return 'Update profile update notification template';
}
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_first_name% %user_last_name% </p> <p>Din profil har blitt oppdatert. Under finner du et sammendrag av endringene. Dersom det ikke var du som gjorde disse endringene, ta kontakt med oss på <a href=\'mailto:support@blomqvist.no\'>support@blomqvist.no</a></p> %updated_fields% <p><b>Utforsk våre auksjoner <a href=\'%auctions_link%\'>her</a></b></p> %footer%";
$text_email_en = "%header% <p>Hei %user_first_name% %user_last_name% </p> <p>Your profile has been updated. The changes are listed below. If these changes were not made by you, please contact us at <a href=\'mailto:support@blomqvist.no\'>support@blomqvist.no</a></p> %updated_fields% <p><b>Explore our ongoing auctions <a href=\'%auctions_link%\'>here</a>.</b></p> %footer%";
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}' WHERE notification_type = " . UserProfileIsUpdatedNotification::TYPE . " AND notification_language = 'nor-NO'");
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}' WHERE notification_type = " . UserProfileIsUpdatedNotification::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>Din profil har blitt oppdatert. Under finner du et sammendrag av endringene. Dersom det ikke var du som gjorde disse endringene, ta kontakt med oss på <a href=\'mailto:support@blomqvist.no\'>support@blomqvist.no</a></p> <p>Adresse endret til: %user_address%</p> <p>Postnummer endret til: %user_postal_code%</p> <p>Poststed endret til: %user_city%</p> <p><b>Utforsk våre auksjoner her</b></p> %footer% ";
$text_email_en = "%header% <p>Hei %user_first_name% %user_last_name% </p> <p>Your profile has been updated. The changes are listed below. If these changes were not made by you, please contact us at <a href=\'mailto:support@blomqvist.no\'>support@blomqvist.no</a></p> <p>Address changed to: %user_address%</p> <p>Postal code changed to: %user_postal_code%</p> <p>City changed to: %user_city%</p> <p><b>Explore our ongoing auctions here.</b></p> %footer% ";
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}' WHERE notification_type = " . UserProfileIsUpdatedNotification::TYPE . " AND notification_language = 'nor-NO'");
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}' WHERE notification_type = " . UserProfileIsUpdatedNotification::TYPE . " AND notification_language = 'eng-GB'");
}
}