<?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 Version20231211180624 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->addSql('CREATE TABLE target_version_log (id INT AUTO_INCREMENT NOT NULL, target_id INT NOT NULL, target_version INT NOT NULL, reasons LONGTEXT NOT NULL COMMENT \'(DC2Type:simple_array)\', old_value LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', new_value LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json)\', created DATETIME NOT NULL, INDEX ix_target_version_log_target_id (target_id), INDEX ix_target_version_log_target_version (target_version), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE target_version_log ADD CONSTRAINT FK_13F007F4158E0B66 FOREIGN KEY (target_id) REFERENCES targets (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE target_version_log DROP FOREIGN KEY FK_13F007F4158E0B66');
$this->addSql('DROP TABLE target_version_log');
}
}