migrations/Version20220208123116.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use App\Notification\Invoice;
  5. use Doctrine\DBAL\Schema\Schema;
  6. use Doctrine\Migrations\AbstractMigration;
  7. /**
  8.  * Auto-generated Migration: Please modify to your needs!
  9.  */
  10. final class Version20220208123116 extends AbstractMigration
  11. {
  12.     public function getDescription(): string
  13.     {
  14.         return 'Added invoice email template';
  15.     }
  16.     public function up(Schema $schema): void
  17.     {
  18.         $body = <<<'html'
  19. Thank you for buying a product from http://www.blomqvist.no. The order is paid and everything is perfect
  20. %product_table%
  21. This order was handled by Blomqvist Norway. Address Somethingroad 42, Oslo
  22. html;
  23.         $this->addSql('INSERT INTO notification_template VALUES(DEFAULT, ' Invoice::TYPE ', "' $body '", null, "Invoice" ,NOW(), NOW(), null)');
  24.     }
  25.     public function down(Schema $schema): void
  26.     {
  27.         $this->addSql('DELETE FROM notification_template WHERE notification_type=' Invoice::TYPE);
  28.     }
  29. }