migrations/Version20220614010019.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use App\Notification\ALotFavoriteReceivedBidNotification;
  5. use App\Notification\AuctionAlertAuctionEndingSoon24HOnlineFavoriteFollowingNotification;
  6. use App\Notification\AuctionAlertAuctionEndingSoon2HOnlineFavoriteFollowingNotification;
  7. use App\Notification\AuctionAlertNotification;
  8. use App\Notification\AuctionEndingSoon24HOnlineBiddingNotification;
  9. use App\Notification\AuctionEndingSoon2HOnlineBiddingNotification;
  10. use App\Notification\SellerObjectNotSoldThirdNotification;
  11. use App\Notification\SellerObjectNotSoldSecondNotification;
  12. use App\Notification\AuctionResultsToSellerNotification;
  13. use App\Notification\AutomaticPaymentSuccessfullReceiptAttachedAsPDFNotification;
  14. use App\Notification\BankCardExpiredNotification;
  15. use App\Notification\BankCardExpiresSoonNotification;
  16. use App\Notification\BidConfirmationOnlineAuctionNotification;
  17. use App\Notification\BidConfirmationOnlineAuctionNotInTheLeadNotification;
  18. use App\Notification\CardPaymentUnsuccessfulLateFeeNotification;
  19. use App\Notification\AdvanceBidNotification;
  20. use App\Notification\PhoneBidNotification;
  21. use App\Notification\InactiveUserFirstNoticeNotification;
  22. use App\Notification\InactiveUserProfileClosedNotification;
  23. use App\Notification\NewPickUpInBergenNotification;
  24. use App\Notification\NewUserRegistrationVerificationNotification;
  25. use App\Notification\NewUserWelcomeEmailNotification;
  26. use App\Notification\OutbidNotificationOnlineAuctionNotification;
  27. use App\Notification\PasswordResetEmailNotification;
  28. use App\Notification\PaymentReceiptReceiptAttachedAsPDFNotification;
  29. use App\Notification\SendExpertViewObjectNotification;
  30. use App\Notification\StorageFeeNumberOneNotification;
  31. use App\Notification\StorageFeeNumberTwoStorageFeeBeginningNotification;
  32. use App\Notification\UserPasswordUpdatedNotification;
  33. use App\Notification\UserPaymentCardUpdatedNotification;
  34. use App\Notification\UserProfileIsUpdatedNotification;
  35. use App\Notification\WinnerEmailOnlineNotification;
  36. use App\Notification\WinnerEmailOnlineWineNotification;
  37. use App\Notification\YourLotsAreLiveOnlineNotification;
  38. use Doctrine\DBAL\Schema\Schema;
  39. use Doctrine\Migrations\AbstractMigration;
  40. /**
  41.  * Auto-generated Migration: Please modify to your needs!
  42.  */
  43. final class Version20220614010019 extends AbstractMigration
  44. {
  45.     public function getDescription(): string
  46.     {
  47.         return 'Add identifier column to notification_template';
  48.     }
  49.     public function up(Schema $schema): void
  50.     {
  51.         // this up() migration is auto-generated, please modify it to your needs
  52.         $this->addSql('ALTER TABLE notification_template ADD identifier VARCHAR(255) NULL AFTER id');
  53.         // nor-No
  54.         $this->addSql('UPDATE notification_template SET identifier = \'USER_REGISTRATION_NOR\' WHERE notification_type = ' NewUserRegistrationVerificationNotification::TYPE ' AND notification_language = \'nor-NO\'');
  55.         $this->addSql('UPDATE notification_template SET identifier = \'USER_WELCOME_NOR\' WHERE notification_type = ' NewUserWelcomeEmailNotification::TYPE ' AND notification_language = \'nor-NO\'');
  56.         $this->addSql('UPDATE notification_template SET identifier = \'PROFILE_UPDATED_NOR\' WHERE notification_type = ' UserProfileIsUpdatedNotification::TYPE ' AND notification_language = \'nor-NO\'');
  57.         $this->addSql('UPDATE notification_template SET identifier = \'PASSWORD_CHANGED_NOR\' WHERE notification_type = ' UserPasswordUpdatedNotification::TYPE ' AND notification_language = \'nor-NO\'');
  58.         $this->addSql('UPDATE notification_template SET identifier = \'CREDITCARD_CHANGED_NOR\' WHERE notification_type = ' UserPaymentCardUpdatedNotification::TYPE ' AND notification_language = \'nor-NO\'');
  59.         $this->addSql('UPDATE notification_template SET identifier = \'CHANGE_YOUR_PASSWORD_NOR\' WHERE notification_type = ' PasswordResetEmailNotification::TYPE ' AND notification_language = \'nor-NO\'');
  60.         $this->addSql('UPDATE notification_template SET identifier = \'BID_CONFIRMATION_LEADING_NOT_AUTOBID_NOR\' WHERE notification_type = ' BidConfirmationOnlineAuctionNotification::TYPE ' AND notification_language = \'nor-NO\'');
  61.         $this->addSql('UPDATE notification_template SET identifier = \'BID_CONFIRMATION_LEADING_AUTOBID_NOR\' WHERE notification_type = ' BidConfirmationOnlineAuctionNotInTheLeadNotification::TYPE ' AND notification_language = \'nor-NO\'');
  62.         $this->addSql('UPDATE notification_template SET identifier = \'BID_CONFIRMATION_OUTBID_NOR\' WHERE notification_type = ' OutbidNotificationOnlineAuctionNotification::TYPE ' AND notification_language = \'nor-NO\'');
  63.         $this->addSql('UPDATE notification_template SET identifier = \'AUCTION_END_TOMORROW_NOR\' WHERE notification_type = ' AuctionEndingSoon24HOnlineBiddingNotification::TYPE ' AND notification_language = \'nor-NO\'');
  64.         $this->addSql('UPDATE notification_template SET identifier = \'AUCTION_END_2HOURS_NOR\' WHERE notification_type = ' AuctionEndingSoon2HOnlineBiddingNotification::TYPE ' AND notification_language = \'nor-NO\'');
  65.         $this->addSql('UPDATE notification_template SET identifier = \'AUCTION_WON_NOR\' WHERE notification_type = ' WinnerEmailOnlineNotification::TYPE ' AND notification_language = \'nor-NO\'');
  66.         $this->addSql('UPDATE notification_template SET identifier = \'SAVED_SEARCH_NOR\' WHERE notification_type = ' AuctionAlertNotification::TYPE ' AND notification_language = \'nor-NO\'');
  67.         $this->addSql('UPDATE notification_template SET identifier = \'FAVORITE_AUCTION_END_TOMORROW_NOR\' WHERE notification_type = ' AuctionAlertAuctionEndingSoon24HOnlineFavoriteFollowingNotification::TYPE ' AND notification_language = \'nor-NO\'');
  68.         $this->addSql('UPDATE notification_template SET identifier = \'FAVORITE_OBJECT_GOT_BID_NOR\' WHERE notification_type = ' ALotFavoriteReceivedBidNotification::TYPE ' AND notification_language = \'nor-NO\'');
  69.         $this->addSql('UPDATE notification_template SET identifier = \'PAYMENT_DONE_AUTOMATIC_NOR\' WHERE notification_type = ' AutomaticPaymentSuccessfullReceiptAttachedAsPDFNotification::TYPE ' AND notification_language = \'nor-NO\'');
  70.         $this->addSql('UPDATE notification_template SET identifier = \'CREDITCARD_FAILED_NOR\' WHERE notification_type = ' CardPaymentUnsuccessfulLateFeeNotification::TYPE ' AND notification_language = \'nor-NO\'');
  71.         $this->addSql('UPDATE notification_template SET identifier = \'FAVORITE_AUCTION_END_2HOURS_NOR\' WHERE notification_type = ' AuctionAlertAuctionEndingSoon2HOnlineFavoriteFollowingNotification::TYPE ' AND notification_language = \'nor-NO\'');
  72.         $this->addSql('UPDATE notification_template SET identifier = \'PAYMENT_DONE_MANUAL_NOR\' WHERE notification_type = ' PaymentReceiptReceiptAttachedAsPDFNotification::TYPE ' AND notification_language = \'nor-NO\'');
  73.         $this->addSql('UPDATE notification_template SET identifier = \'CREDITCARD_EXPIRES_SOON_NOR\' WHERE notification_type = ' BankCardExpiresSoonNotification::TYPE ' AND notification_language = \'nor-NO\'');
  74.         $this->addSql('UPDATE notification_template SET identifier = \'CREDITCARD_EXPIRED_NOR\' WHERE notification_type = ' BankCardExpiredNotification::TYPE ' AND notification_language = \'nor-NO\'');
  75.         $this->addSql('UPDATE notification_template SET identifier = \'ADVANCE_BID_NOR\' WHERE notification_type = ' AdvanceBidNotification::TYPE ' AND notification_language = \'nor-NO\'');
  76.         $this->addSql('UPDATE notification_template SET identifier = \'PHONE_BID_NOR\' WHERE notification_type = ' PhoneBidNotification::TYPE ' AND notification_language = \'nor-NO\'');
  77.         $this->addSql('UPDATE notification_template SET identifier = \'SELLER_FOR_SALE_NOR\' WHERE notification_type = ' YourLotsAreLiveOnlineNotification::TYPE ' AND notification_language = \'nor-NO\'');
  78.         $this->addSql('UPDATE notification_template SET identifier = \'SELLER_OBJECT_SOLD_NOR\' WHERE notification_type = ' AuctionResultsToSellerNotification::TYPE ' AND notification_language = \'nor-NO\'');
  79.         $this->addSql('UPDATE notification_template SET identifier = \'SELLER_OBJECT_NOT_SOLD_NOR\' WHERE notification_type = ' SellerObjectNotSoldSecondNotification::TYPE ' AND notification_language = \'nor-NO\'');
  80.         $this->addSql('UPDATE notification_template SET identifier = \'SELLER_OBJECT_NOT_SOLD_SECOND_NOR\' WHERE notification_type = ' SellerObjectNotSoldThirdNotification::TYPE ' AND notification_language = \'nor-NO\'');
  81.         $this->addSql('UPDATE notification_template SET identifier = \'PICKUP_OBJECT_7_DAYS_NOR\' WHERE notification_type = ' StorageFeeNumberOneNotification::TYPE ' AND notification_language = \'nor-NO\'');
  82.         $this->addSql('UPDATE notification_template SET identifier = \'PICKUP_OBJECT_14_DAYS_NOR\' WHERE notification_type = ' StorageFeeNumberTwoStorageFeeBeginningNotification::TYPE ' AND notification_language = \'nor-NO\'');
  83.         $this->addSql('UPDATE notification_template SET identifier = \'ACCOUNT_INACTIVE_NOR\' WHERE notification_type = ' InactiveUserFirstNoticeNotification::TYPE ' AND notification_language = \'nor-NO\'');
  84.         $this->addSql('UPDATE notification_template SET identifier = \'ACCOUNT_CLOSED_NOR\' WHERE notification_type = ' InactiveUserProfileClosedNotification::TYPE ' AND notification_language = \'nor-NO\'');
  85.         $this->addSql('UPDATE notification_template SET identifier = \'SEND_EXPERT_NOR\' WHERE notification_type = ' SendExpertViewObjectNotification::TYPE ' AND notification_language = \'nor-NO\'');
  86.         $this->addSql('UPDATE notification_template SET identifier = \'AUCTION_WON_WINE_NOR\' WHERE notification_type = ' WinnerEmailOnlineWineNotification::TYPE ' AND notification_language = \'nor-NO\'');
  87.         $this->addSql('UPDATE notification_template SET identifier = \'PICKUP_BERGEN_NOR\' WHERE notification_type = ' NewPickUpInBergenNotification::TYPE ' AND notification_language = \'nor-NO\'');
  88.         //eng-GB
  89.         $this->addSql('UPDATE notification_template SET identifier = \'USER_REGISTRATION_ENG\' WHERE notification_type = ' NewUserRegistrationVerificationNotification::TYPE ' AND notification_language = \'eng-GB\'');
  90.         $this->addSql('UPDATE notification_template SET identifier = \'USER_WELCOME_ENG\' WHERE notification_type = ' NewUserWelcomeEmailNotification::TYPE ' AND notification_language = \'eng-GB\'');
  91.         $this->addSql('UPDATE notification_template SET identifier = \'PROFILE_UPDATED_ENG\' WHERE notification_type = ' UserProfileIsUpdatedNotification::TYPE ' AND notification_language = \'eng-GB\'');
  92.         $this->addSql('UPDATE notification_template SET identifier = \'PASSWORD_CHANGED_ENG\' WHERE notification_type = ' UserPasswordUpdatedNotification::TYPE ' AND notification_language = \'eng-GB\'');
  93.         $this->addSql('UPDATE notification_template SET identifier = \'CREDITCARD_CHANGED_ENG\' WHERE notification_type = ' UserPaymentCardUpdatedNotification::TYPE ' AND notification_language = \'eng-GB\'');
  94.         $this->addSql('UPDATE notification_template SET identifier = \'CHANGE_YOUR_PASSWORD_ENG\' WHERE notification_type = ' PasswordResetEmailNotification::TYPE ' AND notification_language = \'eng-GB\'');
  95.         $this->addSql('UPDATE notification_template SET identifier = \'BID_CONFIRMATION_LEADING_NOT_AUTOBID_ENG\' WHERE notification_type = ' BidConfirmationOnlineAuctionNotification::TYPE ' AND notification_language = \'eng-GB\'');
  96.         $this->addSql('UPDATE notification_template SET identifier = \'BID_CONFIRMATION_LEADING_AUTOBID_ENG\' WHERE notification_type = ' BidConfirmationOnlineAuctionNotInTheLeadNotification::TYPE ' AND notification_language = \'eng-GB\'');
  97.         $this->addSql('UPDATE notification_template SET identifier = \'BID_CONFIRMATION_OUTBID_ENG\' WHERE notification_type = ' OutbidNotificationOnlineAuctionNotification::TYPE ' AND notification_language = \'eng-GB\'');
  98.         $this->addSql('UPDATE notification_template SET identifier = \'AUCTION_END_TOMORROW_ENG\' WHERE notification_type = ' AuctionEndingSoon24HOnlineBiddingNotification::TYPE ' AND notification_language = \'eng-GB\'');
  99.         $this->addSql('UPDATE notification_template SET identifier = \'AUCTION_END_2HOURS_ENG\' WHERE notification_type = ' AuctionEndingSoon2HOnlineBiddingNotification::TYPE ' AND notification_language = \'eng-GB\'');
  100.         $this->addSql('UPDATE notification_template SET identifier = \'AUCTION_WON_ENG\' WHERE notification_type = ' WinnerEmailOnlineNotification::TYPE ' AND notification_language = \'eng-GB\'');
  101.         $this->addSql('UPDATE notification_template SET identifier = \'SAVED_SEARCH_ENG\' WHERE notification_type = ' AuctionAlertNotification::TYPE ' AND notification_language = \'eng-GB\'');
  102.         $this->addSql('UPDATE notification_template SET identifier = \'FAVORITE_AUCTION_END_TOMORROW_ENG\' WHERE notification_type = ' AuctionAlertAuctionEndingSoon24HOnlineFavoriteFollowingNotification::TYPE ' AND notification_language = \'eng-GB\'');
  103.         $this->addSql('UPDATE notification_template SET identifier = \'FAVORITE_OBJECT_GOT_BID_ENG\' WHERE notification_type = ' ALotFavoriteReceivedBidNotification::TYPE ' AND notification_language = \'eng-GB\'');
  104.         $this->addSql('UPDATE notification_template SET identifier = \'PAYMENT_DONE_AUTOMATIC_ENG\' WHERE notification_type = ' AutomaticPaymentSuccessfullReceiptAttachedAsPDFNotification::TYPE ' AND notification_language = \'eng-GB\'');
  105.         $this->addSql('UPDATE notification_template SET identifier = \'CREDITCARD_FAILED_ENG\' WHERE notification_type = ' CardPaymentUnsuccessfulLateFeeNotification::TYPE ' AND notification_language = \'eng-GB\'');
  106.         $this->addSql('UPDATE notification_template SET identifier = \'FAVORITE_AUCTION_END_2HOURS_ENG\' WHERE notification_type = ' AuctionAlertAuctionEndingSoon2HOnlineFavoriteFollowingNotification::TYPE ' AND notification_language = \'eng-GB\'');
  107.         $this->addSql('UPDATE notification_template SET identifier = \'PAYMENT_DONE_MANUAL_ENG\' WHERE notification_type = ' PaymentReceiptReceiptAttachedAsPDFNotification::TYPE ' AND notification_language = \'eng-GB\'');
  108.         $this->addSql('UPDATE notification_template SET identifier = \'CREDITCARD_EXPIRES_SOON_ENG\' WHERE notification_type = ' BankCardExpiresSoonNotification::TYPE ' AND notification_language = \'eng-GB\'');
  109.         $this->addSql('UPDATE notification_template SET identifier = \'CREDITCARD_EXPIRED_ENG\' WHERE notification_type = ' BankCardExpiredNotification::TYPE ' AND notification_language = \'eng-GB\'');
  110.         $this->addSql('UPDATE notification_template SET identifier = \'ADVANCE_BID_ENG\' WHERE notification_type = ' AdvanceBidNotification::TYPE ' AND notification_language = \'eng-GB\'');
  111.         $this->addSql('UPDATE notification_template SET identifier = \'PHONE_BID_ENG\' WHERE notification_type = ' PhoneBidNotification::TYPE ' AND notification_language = \'eng-GB\'');
  112.         $this->addSql('UPDATE notification_template SET identifier = \'SELLER_FOR_SALE_ENG\' WHERE notification_type = ' YourLotsAreLiveOnlineNotification::TYPE ' AND notification_language = \'eng-GB\'');
  113.         $this->addSql('UPDATE notification_template SET identifier = \'SELLER_OBJECT_SOLD_ENG\' WHERE notification_type = ' AuctionResultsToSellerNotification::TYPE ' AND notification_language = \'eng-GB\'');
  114.         $this->addSql('UPDATE notification_template SET identifier = \'SELLER_OBJECT_NOT_SOLD_ENG\' WHERE notification_type = ' SellerObjectNotSoldSecondNotification::TYPE ' AND notification_language = \'eng-GB\'');
  115.         $this->addSql('UPDATE notification_template SET identifier = \'SELLER_OBJECT_NOT_SOLD_SECOND_ENG\' WHERE notification_type = ' SellerObjectNotSoldThirdNotification::TYPE ' AND notification_language = \'eng-GB\'');
  116.         $this->addSql('UPDATE notification_template SET identifier = \'PICKUP_OBJECT_7_DAYS_ENG\' WHERE notification_type = ' StorageFeeNumberOneNotification::TYPE ' AND notification_language = \'eng-GB\'');
  117.         $this->addSql('UPDATE notification_template SET identifier = \'PICKUP_OBJECT_14_DAYS_ENG\' WHERE notification_type = ' StorageFeeNumberTwoStorageFeeBeginningNotification::TYPE ' AND notification_language = \'eng-GB\'');
  118.         $this->addSql('UPDATE notification_template SET identifier = \'ACCOUNT_INACTIVE_ENG\' WHERE notification_type = ' InactiveUserFirstNoticeNotification::TYPE ' AND notification_language = \'eng-GB\'');
  119.         $this->addSql('UPDATE notification_template SET identifier = \'ACCOUNT_CLOSED_ENG\' WHERE notification_type = ' InactiveUserProfileClosedNotification::TYPE ' AND notification_language = \'eng-GB\'');
  120.         $this->addSql('UPDATE notification_template SET identifier = \'SEND_EXPERT_ENG\' WHERE notification_type = ' SendExpertViewObjectNotification::TYPE ' AND notification_language = \'eng-GB\'');
  121.         $this->addSql('UPDATE notification_template SET identifier = \'AUCTION_WON_WINE_ENG\' WHERE notification_type = ' WinnerEmailOnlineWineNotification::TYPE ' AND notification_language = \'eng-GB\'');
  122.         $this->addSql('UPDATE notification_template SET identifier = \'PICKUP_BERGEN_ENG\' WHERE notification_type = ' NewPickUpInBergenNotification::TYPE ' AND notification_language = \'eng-GB\'');
  123.     }
  124.     public function down(Schema $schema): void
  125.     {
  126.         // this down() migration is auto-generated, please modify it to your needs
  127.         $this->addSql('ALTER TABLE notification_template DROP identifier');
  128.     }
  129. }