<?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 Version20210423092707 extends AbstractMigration
{
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE legal_entity_contract_custom_template (id INT AUTO_INCREMENT NOT NULL, contract_id INT DEFAULT NULL, template VARCHAR(255) NOT NULL, enabled TINYINT(1) NOT NULL, path VARCHAR(255) NOT NULL, INDEX IDX_18F669E52576E0FD (contract_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB');
$this->addSql('ALTER TABLE legal_entity_contract_custom_template ADD CONSTRAINT FK_18F669E52576E0FD FOREIGN KEY (contract_id) REFERENCES legal_entity_contract (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('DROP TABLE legal_entity_contract_custom_template');
}
}