migrations/Version20220614155914.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use App\Notification\AuctionAlertAuctionEndingSoon2HOnlineFavoriteFollowingNotification;
  5. use App\Notification\AuctionAlertNotification;
  6. use App\Notification\SellerObjectNotSoldThirdNotification;
  7. use App\Notification\SellerObjectNotSoldSecondNotification;
  8. use App\Notification\AuctionResultsToSellerNotification;
  9. use App\Notification\AutomaticPaymentSuccessfullReceiptAttachedAsPDFNotification;
  10. use App\Notification\BankCardExpiredNotification;
  11. use App\Notification\BankCardExpiresSoonNotification;
  12. use App\Notification\BidConfirmationOnlineAuctionNotification;
  13. use App\Notification\BidConfirmationOnlineAuctionNotInTheLeadNotification;
  14. use App\Notification\CardPaymentUnsuccessfulLateFeeNotification;
  15. use App\Notification\AdvanceBidNotification;
  16. use App\Notification\PhoneBidNotification;
  17. use App\Notification\InactiveUserFirstNoticeNotification;
  18. use App\Notification\InactiveUserProfileClosedNotification;
  19. use App\Notification\PasswordResetEmailNotification;
  20. use App\Notification\PaymentReceiptReceiptAttachedAsPDFNotification;
  21. use App\Notification\UserPasswordUpdatedNotification;
  22. use App\Notification\UserPaymentCardUpdatedNotification;
  23. use App\Notification\UserProfileIsUpdatedNotification;
  24. use App\Notification\YourLotsAreLiveOnlineNotification;
  25. use Doctrine\DBAL\Schema\Schema;
  26. use Doctrine\Migrations\AbstractMigration;
  27. /**
  28.  * Auto-generated Migration: Please modify to your needs!
  29.  */
  30. final class Version20220614155914 extends AbstractMigration
  31. {
  32.     public function getDescription(): string
  33.     {
  34.         return 'Update default notification_template setting';
  35.     }
  36.     public function up(Schema $schema): void
  37.     {
  38.         // this up() migration is auto-generated, please modify it to your needs
  39.         $this->addSql('UPDATE notification_template SET setting = 12 WHERE notification_type = ' UserProfileIsUpdatedNotification::TYPE);
  40.         $this->addSql('UPDATE notification_template SET setting = 60 WHERE notification_type = ' UserPasswordUpdatedNotification::TYPE);
  41.         $this->addSql('UPDATE notification_template SET setting = 60 WHERE notification_type = ' UserPaymentCardUpdatedNotification::TYPE);
  42.         $this->addSql('UPDATE notification_template SET setting = 12 WHERE notification_type = ' PasswordResetEmailNotification::TYPE);
  43.         $this->addSql('UPDATE notification_template SET setting = 61 WHERE notification_type = ' BidConfirmationOnlineAuctionNotification::TYPE);
  44.         $this->addSql('UPDATE notification_template SET setting = 61 WHERE notification_type = ' BidConfirmationOnlineAuctionNotInTheLeadNotification::TYPE);
  45.         $this->addSql('UPDATE notification_template SET setting = 21 WHERE notification_type = ' AuctionAlertNotification::TYPE);
  46.         $this->addSql('UPDATE notification_template SET setting = 21 WHERE notification_type = ' AuctionAlertAuctionEndingSoon2HOnlineFavoriteFollowingNotification::TYPE);
  47.         $this->addSql('UPDATE notification_template SET setting = 60 WHERE notification_type = ' AdvanceBidNotification::TYPE);
  48.         $this->addSql('UPDATE notification_template SET setting = 60 WHERE notification_type = ' PhoneBidNotification::TYPE);
  49.         $this->addSql('UPDATE notification_template SET setting = 21 WHERE notification_type = ' YourLotsAreLiveOnlineNotification::TYPE);
  50.         $this->addSql('UPDATE notification_template SET setting = 53 WHERE notification_type = ' AuctionResultsToSellerNotification::TYPE);
  51.         $this->addSql('UPDATE notification_template SET setting = 53 WHERE notification_type = ' SellerObjectNotSoldSecondNotification::TYPE);
  52.         $this->addSql('UPDATE notification_template SET setting = 61 WHERE notification_type = ' SellerObjectNotSoldThirdNotification::TYPE);
  53.         $this->addSql('UPDATE notification_template SET setting = 61 WHERE notification_type = ' AutomaticPaymentSuccessfullReceiptAttachedAsPDFNotification::TYPE);
  54.         $this->addSql('UPDATE notification_template SET setting = 61 WHERE notification_type = ' PaymentReceiptReceiptAttachedAsPDFNotification::TYPE);
  55.         $this->addSql('UPDATE notification_template SET setting = 61 WHERE notification_type = ' CardPaymentUnsuccessfulLateFeeNotification::TYPE);
  56.         $this->addSql('UPDATE notification_template SET setting = 60 WHERE notification_type = ' BankCardExpiresSoonNotification::TYPE);
  57.         $this->addSql('UPDATE notification_template SET setting = 60 WHERE notification_type = ' BankCardExpiredNotification::TYPE);
  58.         $this->addSql('UPDATE notification_template SET setting = 60 WHERE notification_type = ' InactiveUserFirstNoticeNotification::TYPE);
  59.         $this->addSql('UPDATE notification_template SET setting = 60 WHERE notification_type = ' InactiveUserProfileClosedNotification::TYPE);
  60.     }
  61.     public function down(Schema $schema): void
  62.     {
  63.         // this down() migration is auto-generated, please modify it to your needs
  64.         $this->addSql('UPDATE notification_template SET setting = NULL WHERE notification_type = ' UserProfileIsUpdatedNotification::TYPE);
  65.         $this->addSql('UPDATE notification_template SET setting = NULL WHERE notification_type = ' UserPasswordUpdatedNotification::TYPE);
  66.         $this->addSql('UPDATE notification_template SET setting = NULL WHERE notification_type = ' UserPaymentCardUpdatedNotification::TYPE);
  67.         $this->addSql('UPDATE notification_template SET setting = NULL WHERE notification_type = ' PasswordResetEmailNotification::TYPE);
  68.         $this->addSql('UPDATE notification_template SET setting = 21 WHERE notification_type = ' BidConfirmationOnlineAuctionNotification::TYPE);
  69.         $this->addSql('UPDATE notification_template SET setting = NULL WHERE notification_type = ' BidConfirmationOnlineAuctionNotInTheLeadNotification::TYPE);
  70.         $this->addSql('UPDATE notification_template SET setting = NULL WHERE notification_type = ' AuctionAlertNotification::TYPE);
  71.         $this->addSql('UPDATE notification_template SET setting = NULL WHERE notification_type = ' AuctionAlertAuctionEndingSoon2HOnlineFavoriteFollowingNotification::TYPE);
  72.         $this->addSql('UPDATE notification_template SET setting = 20 WHERE notification_type = ' AdvanceBidNotification::TYPE);
  73.         $this->addSql('UPDATE notification_template SET setting = 20 WHERE notification_type = ' PhoneBidNotification::TYPE);
  74.         $this->addSql('UPDATE notification_template SET setting = NULL WHERE notification_type = ' YourLotsAreLiveOnlineNotification::TYPE);
  75.         $this->addSql('UPDATE notification_template SET setting = 21 WHERE notification_type = ' AuctionResultsToSellerNotification::TYPE);
  76.         $this->addSql('UPDATE notification_template SET setting = 28 WHERE notification_type = ' SellerObjectNotSoldSecondNotification::TYPE);
  77.         $this->addSql('UPDATE notification_template SET setting = 28 WHERE notification_type = ' SellerObjectNotSoldThirdNotification::TYPE);
  78.         $this->addSql('UPDATE notification_template SET setting = 29 WHERE notification_type = ' AutomaticPaymentSuccessfullReceiptAttachedAsPDFNotification::TYPE);
  79.         $this->addSql('UPDATE notification_template SET setting = 29 WHERE notification_type = ' PaymentReceiptReceiptAttachedAsPDFNotification::TYPE);
  80.         $this->addSql('UPDATE notification_template SET setting = 29 WHERE notification_type = ' CardPaymentUnsuccessfulLateFeeNotification::TYPE);
  81.         $this->addSql('UPDATE notification_template SET setting = 20 WHERE notification_type = ' BankCardExpiresSoonNotification::TYPE);
  82.         $this->addSql('UPDATE notification_template SET setting = 21 WHERE notification_type = ' BankCardExpiredNotification::TYPE);
  83.         $this->addSql('UPDATE notification_template SET setting = NULL WHERE notification_type = ' InactiveUserFirstNoticeNotification::TYPE);
  84.         $this->addSql('UPDATE notification_template SET setting = NULL WHERE notification_type = ' InactiveUserProfileClosedNotification::TYPE);
  85.     }
  86. }