<?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 Version20220927080456 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('ALTER TABLE price_map ADD sustainability_option_id INT DEFAULT NULL, ADD packaging_type_id INT DEFAULT NULL, ADD pouch_type_id INT DEFAULT NULL, ADD material_variation_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE price_map ADD CONSTRAINT FK_C6C1A134D2BD542F FOREIGN KEY (sustainability_option_id) REFERENCES sustainability_option (id)');
$this->addSql('ALTER TABLE price_map ADD CONSTRAINT FK_C6C1A1342DE8FC4E FOREIGN KEY (packaging_type_id) REFERENCES packaging_type (id)');
$this->addSql('ALTER TABLE price_map ADD CONSTRAINT FK_C6C1A134697E1986 FOREIGN KEY (pouch_type_id) REFERENCES pouch (id)');
$this->addSql('ALTER TABLE price_map ADD CONSTRAINT FK_C6C1A1345FFA2BD8 FOREIGN KEY (material_variation_id) REFERENCES material_variation (id)');
$this->addSql('CREATE INDEX IDX_C6C1A134D2BD542F ON price_map (sustainability_option_id)');
$this->addSql('CREATE INDEX IDX_C6C1A1342DE8FC4E ON price_map (packaging_type_id)');
$this->addSql('CREATE INDEX IDX_C6C1A134697E1986 ON price_map (pouch_type_id)');
$this->addSql('CREATE INDEX IDX_C6C1A1345FFA2BD8 ON price_map (material_variation_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE price_map DROP FOREIGN KEY FK_C6C1A134D2BD542F');
$this->addSql('ALTER TABLE price_map DROP FOREIGN KEY FK_C6C1A1342DE8FC4E');
$this->addSql('ALTER TABLE price_map DROP FOREIGN KEY FK_C6C1A134697E1986');
$this->addSql('ALTER TABLE price_map DROP FOREIGN KEY FK_C6C1A1345FFA2BD8');
$this->addSql('DROP INDEX IDX_C6C1A134D2BD542F ON price_map');
$this->addSql('DROP INDEX IDX_C6C1A1342DE8FC4E ON price_map');
$this->addSql('DROP INDEX IDX_C6C1A134697E1986 ON price_map');
$this->addSql('DROP INDEX IDX_C6C1A1345FFA2BD8 ON price_map');
$this->addSql('ALTER TABLE price_map DROP sustainability_option_id, DROP packaging_type_id, DROP pouch_type_id, DROP material_variation_id');
}
}