<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use App\Notification\Invoice;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20220208123116 extends AbstractMigration
{
public function getDescription(): string
{
return 'Added invoice email template';
}
public function up(Schema $schema): void
{
$body = <<<'html'
Thank you for buying a product from http://www.blomqvist.no. The order is paid and everything is perfect
%product_table%
This order was handled by Blomqvist Norway. Address Somethingroad 42, Oslo
html;
$this->addSql('INSERT INTO notification_template VALUES(DEFAULT, ' . Invoice::TYPE . ', "' . $body . '", null, "Invoice" ,NOW(), NOW(), null)');
}
public function down(Schema $schema): void
{
$this->addSql('DELETE FROM notification_template WHERE notification_type=' . Invoice::TYPE);
}
}