<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20250715000002 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add sample test notification template';
}
public function up(Schema $schema): void
{
// Insert sample test notification template
$this->addSql("INSERT INTO abap_notification_template (id, type, method, subject, content, created_at) VALUES
(gen_random_uuid(), 'test_notification', 'email', 'Test Notification - {{ timestamp|date(\"Y-m-d H:i:s\") }}',
'<h1>Test 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 = 'test_notification'");
}
}