migrations/Version20220526220452.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use App\Notification\AuctionEndingSoon2HOnlineBiddingNotification;
  5. use Doctrine\DBAL\Schema\Schema;
  6. use Doctrine\Migrations\AbstractMigration;
  7. /**
  8.  * Auto-generated Migration: Please modify to your needs!
  9.  */
  10. final class Version20220526220452 extends AbstractMigration
  11. {
  12.     public function getDescription(): string
  13.     {
  14.         return 'Update AuctionEndingSoon2HOnlineBiddingNotification user_name';
  15.     }
  16.     public function up(Schema $schema): void
  17.     {
  18.         // this up() migration is auto-generated, please modify it to your needs
  19.         $text_email_no "%logo% <p>Hei %user_name%</p> <p>Du har tidligere lagt inn bud på dette objektet, men ble overbudt. Auksjonen avsluttes om to timer. Du kan fortsatt vinne.</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> <p><b>Ditt maxbud: %max_bid%</b></p> <br> <p>Du kan endre dine preferanser for varslinger på <u>Min Side</u>.</p> %footer%";
  20.         $text_email_en "%logo% <p>Hi %user_name%</p> <p>An auction you\'ve participated in is ending in two hours. You can still win.</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> <p><b>Your maximum bid: %max_bid%</b></p> <br> <p>Your notification preferences can be changed on <u>My Page</u>.</p> %footer%";
  21.         $this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}' WHERE notification_type = " AuctionEndingSoon2HOnlineBiddingNotification::TYPE " AND notification_language = 'nor-NO'");
  22.         $this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}' WHERE notification_type = " AuctionEndingSoon2HOnlineBiddingNotification::TYPE " AND notification_language = 'eng-GB'");
  23.     }
  24.     public function down(Schema $schema): void
  25.     {
  26.         // this down() migration is auto-generated, please modify it to your needs
  27.         $text_email_no "%logo% <p>Hei %user_first_name% %user_last_name%</p> <p>Du har tidligere lagt inn bud på dette objektet, men ble overbudt. Auksjonen avsluttes om to timer. Du kan fortsatt vinne.</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> <p><b>Ditt maxbud: %max_bid%</b></p> <br> <p>Du kan endre dine preferanser for varslinger på <u>Min Side</u>.</p> %footer%";
  28.         $text_email_en "%logo% <p>Hei %user_first_name% %user_last_name%</p> <p>An auction you\'ve participated in is ending in two hours. You can still win.</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> <p><b>Your maximum bid: %max_bid%</b></p> <br> <p>Your notification preferences can be changed on <u>My Page</u>.</p> %footer%";
  29.         $this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}' WHERE notification_type = " AuctionEndingSoon2HOnlineBiddingNotification::TYPE " AND notification_language = 'nor-NO'");
  30.         $this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}' WHERE notification_type = " AuctionEndingSoon2HOnlineBiddingNotification::TYPE " AND notification_language = 'eng-GB'");
  31.     }
  32. }