<?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 Version20221208232348 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 brand_box (id INT AUTO_INCREMENT NOT NULL, brand_id INT NOT NULL, base_id INT NOT NULL, regular_id INT DEFAULT NULL, eco_id INT DEFAULT NULL, INDEX IDX_6DE25D4B44F5D008 (brand_id), INDEX IDX_6DE25D4B6967DF41 (base_id), INDEX IDX_6DE25D4BE0EE4AFF (regular_id), INDEX IDX_6DE25D4BCD2CC9A0 (eco_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE brand_box ADD CONSTRAINT FK_6DE25D4B44F5D008 FOREIGN KEY (brand_id) REFERENCES brand (id)');
$this->addSql('ALTER TABLE brand_box ADD CONSTRAINT FK_6DE25D4B6967DF41 FOREIGN KEY (base_id) REFERENCES box (id)');
$this->addSql('ALTER TABLE brand_box ADD CONSTRAINT FK_6DE25D4BE0EE4AFF FOREIGN KEY (regular_id) REFERENCES box (id)');
$this->addSql('ALTER TABLE brand_box ADD CONSTRAINT FK_6DE25D4BCD2CC9A0 FOREIGN KEY (eco_id) REFERENCES box (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE brand_box');
}
}