migrations/Version20220516201502.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use App\Notification\UserProfileIsUpdatedNotification;
  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 Version20220516201502 extends AbstractMigration
  11. {
  12.     public function getDescription(): string
  13.     {
  14.         return 'Update profile 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_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%";
  20.         $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%";
  21.         $this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}' WHERE notification_type = " UserProfileIsUpdatedNotification::TYPE " AND notification_language = 'nor-NO'");
  22.         $this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}' WHERE notification_type = " UserProfileIsUpdatedNotification::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>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% ";
  28.         $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% ";
  29.         $this->addSql("UPDATE notification_template SET text_email = '{$text_email_no}' WHERE notification_type = " UserProfileIsUpdatedNotification::TYPE " AND notification_language = 'nor-NO'");
  30.         $this->addSql("UPDATE notification_template SET text_email = '{$text_email_en}' WHERE notification_type = " UserProfileIsUpdatedNotification::TYPE " AND notification_language = 'eng-GB'");
  31.     }
  32. }