<?php
declare(strict_types=1);
namespace Application\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20200703090226 extends AbstractMigration
{
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE `legal_entity_order_invoice_manual` ADD COLUMN `comment` TEXT ');
$this->addSql('CREATE TABLE legal_entity_order_invoice_remark (id INT AUTO_INCREMENT NOT NULL, author_id INT DEFAULT NULL, invoice_id INT DEFAULT NULL, date DATETIME NOT NULL COMMENT \'(DC2Type:carbondatetime)\', contents LONGTEXT NOT NULL, INDEX IDX_5AFC456AF675F31B (author_id), INDEX IDX_5AFC456A2989F1FD (invoice_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE legal_entity_order_invoice_remark ADD CONSTRAINT FK_5AFC456AF675F31B FOREIGN KEY (author_id) REFERENCES security_user (id)');
$this->addSql('ALTER TABLE legal_entity_order_invoice_remark ADD CONSTRAINT FK_5AFC456A2989F1FD FOREIGN KEY (invoice_id) REFERENCES legal_entity_order_invoice (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE `legal_entity_order_invoice_manual` DROP COLUMN `comment`');
$this->addSql('DROP TABLE legal_entity_order_invoice_remark');
}
}