template-backend/data/migrations/template/Version20250104024641.php
2025-01-04 04:01:24 +01:00

42 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace Template\Migrations\Template;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20250104024641 extends AbstractMigration
{
public function getDescription(): string
{
return "Create Table 'mail'";
}
public function up(Schema $schema): void
{
$sql = "CREATE TABLE mail (
id binary(16) NOT NULL,
template varchar(255) NOT NULL,
data json NOT NULL,
recipient varchar(255) NOT NULL,
sender varchar(255) NULL,
sender_name varchar(255) NULL,
failed_at datetime NULL,
created_at datetime NOT NULL,
PRIMARY KEY (id)
);";
$this->addSql($sql);
}
public function down(Schema $schema): void
{
$this->addSql("DROP TABLE mail;");
}
}