Skip to content

Commit

Permalink
migration
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-stanek committed Oct 13, 2023
1 parent dc420bc commit 3f8a5a7
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions migrations/Version20231013144631.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

declare(strict_types=1);

namespace Migrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

final class Version20231013144631 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}

public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE mail_queue (id INT AUTO_INCREMENT NOT NULL, mail_id INT DEFAULT NULL, recipient_email VARCHAR(255) NOT NULL, recipient_name VARCHAR(255) DEFAULT NULL, sent TINYINT(1) NOT NULL, enqueue_datetime DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', send_datetime DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_4B3EDD0CC8776F01 (mail_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE mail_queue ADD CONSTRAINT FK_4B3EDD0CC8776F01 FOREIGN KEY (mail_id) REFERENCES mail (id)');
}

public function down(Schema $schema): void
{
}
}

0 comments on commit 3f8a5a7

Please sign in to comment.