<?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 Version20220420094741 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 transfer_gestiuni ADD gestiuneIntrare INT NOT NULL, ADD gestiuneIesire INT NOT NULL, ADD idProdus INT NOT NULL, DROP gestiune_intrare, DROP gestiune_iesire, DROP id_produs');
$this->addSql('ALTER TABLE transfer_gestiuni ADD CONSTRAINT FK_DDD38C64567E4F3F FOREIGN KEY (gestiuneIntrare) REFERENCES gestiune (id)');
$this->addSql('ALTER TABLE transfer_gestiuni ADD CONSTRAINT FK_DDD38C64DAA9ED1A FOREIGN KEY (gestiuneIesire) REFERENCES gestiune (id)');
$this->addSql('ALTER TABLE transfer_gestiuni ADD CONSTRAINT FK_DDD38C64ED3C9ECB FOREIGN KEY (idProdus) REFERENCES products (id)');
$this->addSql('CREATE INDEX IDX_DDD38C64567E4F3F ON transfer_gestiuni (gestiuneIntrare)');
$this->addSql('CREATE INDEX IDX_DDD38C64DAA9ED1A ON transfer_gestiuni (gestiuneIesire)');
$this->addSql('CREATE INDEX IDX_DDD38C64ED3C9ECB ON transfer_gestiuni (idProdus)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE transfer_gestiuni DROP FOREIGN KEY FK_DDD38C64567E4F3F');
$this->addSql('ALTER TABLE transfer_gestiuni DROP FOREIGN KEY FK_DDD38C64DAA9ED1A');
$this->addSql('ALTER TABLE transfer_gestiuni DROP FOREIGN KEY FK_DDD38C64ED3C9ECB');
$this->addSql('DROP INDEX IDX_DDD38C64567E4F3F ON transfer_gestiuni');
$this->addSql('DROP INDEX IDX_DDD38C64DAA9ED1A ON transfer_gestiuni');
$this->addSql('DROP INDEX IDX_DDD38C64ED3C9ECB ON transfer_gestiuni');
$this->addSql('ALTER TABLE transfer_gestiuni ADD gestiune_intrare INT NOT NULL, ADD gestiune_iesire INT NOT NULL, ADD id_produs INT NOT NULL, DROP gestiuneIntrare, DROP gestiuneIesire, DROP idProdus');
}
}