<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use App\Notification\AuctionAlertAuctionEndingSoon24HOnlineFavoriteFollowingNotification;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220601182025 extends AbstractMigration
{
public function getDescription(): string
{
return 'Updated name in AuctionAlertAuctionEndingSoon24HOnlineFavoriteFollowingNotification';
}
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>Auksjonen til en av dine favoritter avsluttes i morgen. Du kan følge auksjonen på <u>Min Side</u> og på <u>Blomqvist.no</u>.</p> <p>%list_objects_ending_following_day%</p> <p>Du kan endre dine preferanser for varslinger på <u>Min Side</u> %hyperlink_my_notifications_page%.</p> %footer%";
$text_email_en = "%header% <p>Hi %user_name%</p> <p>The auction for a lot you have favorited is ending tomorrow. You may follow the auction on <u>My Page</u> and on <u>Blomqvist.no</u>.</p> <p>%list_objects_ending_following_day%</p> <p>Your notification preferences can be changed on <u>My Page</u> %hyperlink_my_notifications_page%.</p> %footer%";
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}' WHERE notification_type = " . AuctionAlertAuctionEndingSoon24HOnlineFavoriteFollowingNotification::TYPE . " AND notification_language = 'nor-NO'");
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}' WHERE notification_type = " . AuctionAlertAuctionEndingSoon24HOnlineFavoriteFollowingNotification::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>Auksjonen til en av dine favoritter avsluttes i morgen. Du kan følge auksjonen på <u>Min Side</u> og på <u>Blomqvist.no</u>.</p> <p>%list_objects_ending_following_day%</p> <br> <hr> <p>Objektnummer: %lot_number%, %link_to_lot%</p> <p>Beskrivelse: %artist%, %title%</p> <p>Vurdering: %low_estimate% - %high_estimate%</p> <p>Nåværende bud: %current_bid%</p> <p>Auksjonsavslutning: %auction_end_date_time%</p> <hr> <br> <p>Du kan endre dine preferanser for varslinger på <u>Min Side</u> %hyperlink_my_notifications_page%.</p> %footer%";
$text_email_en = "%header% <p>Hei %user_first_name% %user_last_name%</p> <p>The auction for a lot you have favorited is ending tomorrow. You may follow the auction on <u>My Page</u> and on <u>Blomqvist.no</u>.</p> <p>%list_objects_ending_following_day%</p> <br> <hr> <p>Lot number: %lot_number%, %link_to_lot%</p> <p>Description: %artist%, %title%</p> <p>Estimate: %low_estimate% - %high_estimate%</p> <p>Current bid: %current_bid%</p> <p>The auction ends: %auction_end_date_time%</p> <hr> <br> <p>Your notification preferences can be changed on <u>My Page</u> %hyperlink_my_notifications_page%.</p> %footer%";
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}', `subject` = NULL WHERE notification_type = " . AuctionAlertAuctionEndingSoon24HOnlineFavoriteFollowingNotification::TYPE . " AND notification_language = 'nor-NO'");
$this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}', `subject` = NULL WHERE notification_type = " . AuctionAlertAuctionEndingSoon24HOnlineFavoriteFollowingNotification::TYPE . " AND notification_language = 'eng-GB'");
}
}