migrations/Version20221006202890.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use App\Notification\AutochargeVipNotification;
  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 Version20221006202890 extends AbstractMigration
  11. {
  12.     public function getDescription(): string
  13.     {
  14.         return 'Update vip notification';
  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 '<p><a href="%link_to_avanti_customer%">%customer_number%</a> %user_name% skal faktureres for kjøp av <a href="%link_to_avanti_lot%">%lot_number%</a> %object_title%</p>';
  20.         $text_email_en '<p><a href="%link_to_avanti_customer%">%customer_number%</a> %user_name% will be invoiced for the purchase of <a href="%link_to_avanti_lot%">%lot_number%</a> %object_title%</p>';
  21.         $this->addSql("UPDATE notification_template SET identifier = 'VIP_PAYMENT_PENDING_NOR', text_email = '{$text_email_no}' WHERE notification_type = '" AutochargeVipNotification::TYPE "' AND notification_language = 'nor-NO'");
  22.         $this->addSql("UPDATE notification_template SET identifier = 'VIP_PAYMENT_PENDING_ENG', text_email = '{$text_email_en}' WHERE notification_type = '" AutochargeVipNotification::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 '<p>%customer_number% %user_name% skal faktureres for kjøp av %lot_number% %object_title%</p>';
  28.         $text_email_en '<p>%customer_number% %user_name% will be invoiced for the purchase of %lot_number% %object_title%</p>';
  29.         $this->addSql("UPDATE notification_template SET identifier = 'PAYMENT_DONE_AUTOMATIC_VIPPS_NOR', text_email = '{$text_email_no}' WHERE notification_type = '" AutochargeVipNotification::TYPE "' AND notification_language = 'nor-NO'");
  30.         $this->addSql("UPDATE notification_template SET identifier = 'PAYMENT_DONE_AUTOMATIC_VIPPS_ENG', text_email = '{$text_email_en}' WHERE notification_type = '" AutochargeVipNotification::TYPE "' AND notification_language = 'eng-GB'");
  31.     }
  32. }