<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use App\Notification\BankCardExpiredNotification;
use App\Notification\BankCardExpiresSoonNotification;
use App\Notification\CardPaymentUnsuccessfulLateFeeNotification;
use App\Notification\InactiveUserFirstNoticeNotification;
use App\Notification\InactiveUserProfileClosedNotification;
use App\Notification\StorageFeeNumberOneNotification;
use App\Notification\StorageFeeNumberTwoStorageFeeBeginningNotification;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220614140535 extends AbstractMigration
{
public function getDescription(): string
{
return 'Update notification_template default values';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$notification_types = [
StorageFeeNumberOneNotification::TYPE,
StorageFeeNumberTwoStorageFeeBeginningNotification::TYPE,
CardPaymentUnsuccessfulLateFeeNotification::TYPE,
BankCardExpiresSoonNotification::TYPE,
BankCardExpiredNotification::TYPE,
InactiveUserFirstNoticeNotification::TYPE,
InactiveUserProfileClosedNotification::TYPE,
];
$this->addSql('UPDATE notification_template SET category = \'Betaling og lagerleie\' WHERE notification_type IN (' . implode(',', $notification_types) . ')');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$notification_types = [
StorageFeeNumberOneNotification::TYPE,
StorageFeeNumberTwoStorageFeeBeginningNotification::TYPE,
CardPaymentUnsuccessfulLateFeeNotification::TYPE,
BankCardExpiresSoonNotification::TYPE,
BankCardExpiredNotification::TYPE,
InactiveUserFirstNoticeNotification::TYPE,
InactiveUserProfileClosedNotification::TYPE,
];
$this->addSql('UPDATE notification_template SET category = \'Meldinger fra Blomqvist\' WHERE notification_type IN (' . implode(',', $notification_types) . ')');
}
}