<?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 Version20210921015723 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 product_field (id INT AUTO_INCREMENT NOT NULL, product_id INT NOT NULL, product_type_field_id INT NOT NULL, value LONGTEXT DEFAULT NULL, INDEX IDX_FAA93E044584665A (product_id), INDEX IDX_FAA93E0453253CBE (product_type_field_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE product_field ADD CONSTRAINT FK_FAA93E044584665A FOREIGN KEY (product_id) REFERENCES product (id)');
$this->addSql('ALTER TABLE product_field ADD CONSTRAINT FK_FAA93E0453253CBE FOREIGN KEY (product_type_field_id) REFERENCES product_type_field (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE product_field');
}
}