<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20200904163008 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
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('TRUNCATE TABLE customer_fax_log');
$this->addSql('ALTER TABLE customer_fax_log ADD file_id INT DEFAULT NULL, DROP file, CHANGE status status VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE customer_fax_log ADD CONSTRAINT FK_80CDDBCD93CB796C FOREIGN KEY (file_id) REFERENCES customer_file (id) ON DELETE SET NULL');
$this->addSql('CREATE INDEX IDX_80CDDBCD93CB796C ON customer_fax_log (file_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('ALTER TABLE customer_fax_log DROP FOREIGN KEY FK_80CDDBCD93CB796C');
$this->addSql('DROP INDEX IDX_80CDDBCD93CB796C ON customer_fax_log');
$this->addSql('ALTER TABLE customer_fax_log ADD file VARCHAR(255) NOT NULL COLLATE utf8mb4_general_ci, DROP file_id, CHANGE status status INT DEFAULT NULL');
}
}