<?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 Version20220420093702 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 factura_produs CHANGE idprodusr idProdus INT NOT NULL');
$this->addSql('ALTER TABLE factura_produs ADD CONSTRAINT FK_5FF02A0CED3C9ECB FOREIGN KEY (idProdus) REFERENCES products (id)');
$this->addSql('CREATE INDEX IDX_5FF02A0CED3C9ECB ON factura_produs (idProdus)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE factura_produs DROP FOREIGN KEY FK_5FF02A0CED3C9ECB');
$this->addSql('DROP INDEX IDX_5FF02A0CED3C9ECB ON factura_produs');
$this->addSql('ALTER TABLE factura_produs CHANGE idprodus idProdusr INT NOT NULL');
}
}