migrations/Version20220516220848.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use App\Notification\UserPaymentCardUpdatedNotification;
  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 Version20220516220848 extends AbstractMigration
  11. {
  12.     public function getDescription(): string
  13.     {
  14.         return 'Update card update notification template';
  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 "%header% <p>Hei %user_name%</p> <p>Ditt betalingskort på Blomqvist.no har blitt oppdatert. Endringene kan du se på <u>Min Side</u> på <u>Blomqvist.no</u>. Dersom det ikke var du som gjorde denne endringene, ta kontakt med oss på <a href=\'mailto:support@blomqvist.no\'>support@blomqvist.no</a></p> <p><a href=\'%link_live_auction%\'><b>Utforsk våre auksjoner her</b></a></p> %footer% ";
  20.         $text_email_en "%header% <p>Hei %user_name%</p> <p>Your saved payment card on Blomqvist.no has been updated. The changes can be reviewed on <u>My Page</u> on <u>Blomqvist.no</u>. has been updated. If this change was not made by you, please contact us at <a href=\'mailto:support@blomqvist.no\'>support@blomqvist.no</a></p> <p><a href=\'%link_live_auction%\'><b>Explore all ongoing auctions here.</b></a></p> %footer%";
  21.         $this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}' WHERE notification_type = " UserPaymentCardUpdatedNotification::TYPE " AND notification_language = 'nor-NO'");
  22.         $this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}' WHERE notification_type = " UserPaymentCardUpdatedNotification::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 "%header% <p>Hei %user_first_name% %user_last_name%</p> <p>Ditt betalingskort på Blomqvist.no har blitt oppdatert. Endringene kan du se på <u>Min Side</u> på <u>Blomqvist.no</u>. Dersom det ikke var du som gjorde denne endringene, ta kontakt med oss på <a href=\'mailto:support@blomqvist.no\'>support@blomqvist.no</a></p> <p><a href=\'%link_live_auction%\'><b>Utforsk våre auksjoner her</b></a></p> %footer% ";
  28.         $text_email_en "%header% <p>Hei %user_first_name% %user_last_name%</p> <p>Your saved payment card on Blomqvist.no has been updated. The changes can be reviewed on <u>My Page</u> on <u>Blomqvist.no</u>. has been updated. If this change was not made by you, please contact us at <a href=\'mailto:support@blomqvist.no\'>support@blomqvist.no</a></p> <p><a href=\'%link_live_auction%\'><b>Explore all ongoing auctions here.</b></a></p> %footer%";
  29.         $this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}' WHERE notification_type = " UserPaymentCardUpdatedNotification::TYPE " AND notification_language = 'nor-NO'");
  30.         $this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}' WHERE notification_type = " UserPaymentCardUpdatedNotification::TYPE " AND notification_language = 'eng-GB'");
  31.     }
  32. }