<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20250715000006 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add system notification template for test notifications';
}
public function up(Schema $schema): void
{
// Add system notification template for test notifications
$this->addSql("INSERT INTO abap_notification_template (id, type, method, subject, content, created_at) VALUES
(gen_random_uuid(), 'App\\Notification\\Type\\TestNotification', 'Abap\\NotifierBundle\\Method\\SystemNotificationMethod',
'Test System Notification - {{ timestamp|date(\"Y-m-d H:i:s\") }}',
'<h1>Test System Notification</h1><p>{{ message }}</p><p>Sent to: {{ recipient }}</p><p>Time: {{ timestamp|date(\"Y-m-d H:i:s\") }}</p>',
NOW())");
}
public function down(Schema $schema): void
{
$this->addSql("DELETE FROM abap_notification_template WHERE type = 'App\\Notification\\Type\\TestNotification' AND method = 'Abap\\NotifierBundle\\Method\\SystemNotificationMethod'");
}
}