<?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 Version20230815123706 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 operation DROP FOREIGN KEY FK_1981A66D16A23D2C');
$this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66D362CF80A');
$this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66DD0F2C8D');
$this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66DFEF86B7');
$this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66D2F614391');
$this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66D6ACB2BFA');
$this->addSql('DROP INDEX IDX_1981A66D362CF80A ON operation');
$this->addSql('DROP INDEX IDX_1981A66DFEF86B7 ON operation');
$this->addSql('DROP INDEX IDX_1981A66D6ACB2BFA ON operation');
$this->addSql('DROP INDEX IDX_1981A66D2F614391 ON operation');
$this->addSql('DROP INDEX IDX_1981A66D16A23D2C ON operation');
$this->addSql('DROP INDEX IDX_1981A66DD0F2C8D ON operation');
$this->addSql('ALTER TABLE operation ADD supplier_id INT DEFAULT NULL, ADD provider_id INT DEFAULT NULL, ADD container_id INT DEFAULT NULL, DROP source_supplier_id, DROP source_provider_id, DROP destination_supplier_id, DROP destination_provider_id, DROP source_container_id, DROP destination_container_id');
$this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66D2ADD6D8C FOREIGN KEY (supplier_id) REFERENCES supplier (id)');
$this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66DA53A8AA FOREIGN KEY (provider_id) REFERENCES provider (id)');
$this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66DBC21F742 FOREIGN KEY (container_id) REFERENCES container (id)');
$this->addSql('CREATE INDEX IDX_1981A66D2ADD6D8C ON operation (supplier_id)');
$this->addSql('CREATE INDEX IDX_1981A66DA53A8AA ON operation (provider_id)');
$this->addSql('CREATE INDEX IDX_1981A66DBC21F742 ON operation (container_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66D2ADD6D8C');
$this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66DA53A8AA');
$this->addSql('ALTER TABLE operation DROP FOREIGN KEY FK_1981A66DBC21F742');
$this->addSql('DROP INDEX IDX_1981A66D2ADD6D8C ON operation');
$this->addSql('DROP INDEX IDX_1981A66DA53A8AA ON operation');
$this->addSql('DROP INDEX IDX_1981A66DBC21F742 ON operation');
$this->addSql('ALTER TABLE operation ADD source_supplier_id INT DEFAULT NULL, ADD source_provider_id INT DEFAULT NULL, ADD destination_supplier_id INT DEFAULT NULL, ADD destination_provider_id INT DEFAULT NULL, ADD source_container_id INT DEFAULT NULL, ADD destination_container_id INT DEFAULT NULL, DROP supplier_id, DROP provider_id, DROP container_id');
$this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66D16A23D2C FOREIGN KEY (source_supplier_id) REFERENCES supplier (id)');
$this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66D362CF80A FOREIGN KEY (source_provider_id) REFERENCES provider (id)');
$this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66DD0F2C8D FOREIGN KEY (destination_container_id) REFERENCES container (id)');
$this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66DFEF86B7 FOREIGN KEY (destination_supplier_id) REFERENCES supplier (id)');
$this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66D2F614391 FOREIGN KEY (destination_provider_id) REFERENCES provider (id)');
$this->addSql('ALTER TABLE operation ADD CONSTRAINT FK_1981A66D6ACB2BFA FOREIGN KEY (source_container_id) REFERENCES container (id)');
$this->addSql('CREATE INDEX IDX_1981A66D362CF80A ON operation (source_provider_id)');
$this->addSql('CREATE INDEX IDX_1981A66DFEF86B7 ON operation (destination_supplier_id)');
$this->addSql('CREATE INDEX IDX_1981A66D6ACB2BFA ON operation (source_container_id)');
$this->addSql('CREATE INDEX IDX_1981A66D2F614391 ON operation (destination_provider_id)');
$this->addSql('CREATE INDEX IDX_1981A66D16A23D2C ON operation (source_supplier_id)');
$this->addSql('CREATE INDEX IDX_1981A66DD0F2C8D ON operation (destination_container_id)');
}
}