migrations/Version20220614140535.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use App\Notification\BankCardExpiredNotification;
  5. use App\Notification\BankCardExpiresSoonNotification;
  6. use App\Notification\CardPaymentUnsuccessfulLateFeeNotification;
  7. use App\Notification\InactiveUserFirstNoticeNotification;
  8. use App\Notification\InactiveUserProfileClosedNotification;
  9. use App\Notification\StorageFeeNumberOneNotification;
  10. use App\Notification\StorageFeeNumberTwoStorageFeeBeginningNotification;
  11. use Doctrine\DBAL\Schema\Schema;
  12. use Doctrine\Migrations\AbstractMigration;
  13. /**
  14.  * Auto-generated Migration: Please modify to your needs!
  15.  */
  16. final class Version20220614140535 extends AbstractMigration
  17. {
  18.     public function getDescription(): string
  19.     {
  20.         return 'Update notification_template default values';
  21.     }
  22.     public function up(Schema $schema): void
  23.     {
  24.         // this up() migration is auto-generated, please modify it to your needs
  25.         $notification_types = [
  26.             StorageFeeNumberOneNotification::TYPE,
  27.             StorageFeeNumberTwoStorageFeeBeginningNotification::TYPE,
  28.             CardPaymentUnsuccessfulLateFeeNotification::TYPE,
  29.             BankCardExpiresSoonNotification::TYPE,
  30.             BankCardExpiredNotification::TYPE,
  31.             InactiveUserFirstNoticeNotification::TYPE,
  32.             InactiveUserProfileClosedNotification::TYPE,
  33.         ];
  34.         $this->addSql('UPDATE notification_template SET category = \'Betaling og lagerleie\' WHERE notification_type IN (' implode(','$notification_types) . ')');
  35.     }
  36.     public function down(Schema $schema): void
  37.     {
  38.         // this down() migration is auto-generated, please modify it to your needs
  39.         $notification_types = [
  40.             StorageFeeNumberOneNotification::TYPE,
  41.             StorageFeeNumberTwoStorageFeeBeginningNotification::TYPE,
  42.             CardPaymentUnsuccessfulLateFeeNotification::TYPE,
  43.             BankCardExpiresSoonNotification::TYPE,
  44.             BankCardExpiredNotification::TYPE,
  45.             InactiveUserFirstNoticeNotification::TYPE,
  46.             InactiveUserProfileClosedNotification::TYPE,
  47.         ];
  48.         $this->addSql('UPDATE notification_template SET category = \'Meldinger fra Blomqvist\' WHERE notification_type IN (' implode(','$notification_types) . ')');
  49.     }
  50. }