migrations/Version20250715000002.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. final class Version20250715000002 extends AbstractMigration
  7. {
  8.     public function getDescription(): string
  9.     {
  10.         return 'Add sample test notification template';
  11.     }
  12.     public function up(Schema $schema): void
  13.     {
  14.         // Insert sample test notification template
  15.         $this->addSql("INSERT INTO abap_notification_template (id, type, method, subject, content, created_at) VALUES 
  16.             (gen_random_uuid(), 'test_notification', 'email', 'Test Notification - {{ timestamp|date(\"Y-m-d H:i:s\") }}', 
  17.             '<h1>Test Notification</h1><p>{{ message }}</p><p>Sent to: {{ recipient }}</p><p>Time: {{ timestamp|date(\"Y-m-d H:i:s\") }}</p>', 
  18.             NOW())");
  19.     }
  20.     public function down(Schema $schema): void
  21.     {
  22.         $this->addSql("DELETE FROM abap_notification_template WHERE type = 'test_notification'");
  23.     }
  24. }