<?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 Version20221031173015 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 ADD id_categorii_cheltuieli INT DEFAULT NULL, DROP idCategoriiCheltuieli');
$this->addSql('ALTER TABLE factura_produs ADD CONSTRAINT FK_5FF02A0C295A6603 FOREIGN KEY (id_categorii_cheltuieli) REFERENCES categoriicheltuieli (id)');
$this->addSql('CREATE INDEX IDX_5FF02A0C295A6603 ON factura_produs (id_categorii_cheltuieli)');
}
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_5FF02A0C295A6603');
$this->addSql('DROP INDEX IDX_5FF02A0C295A6603 ON factura_produs');
$this->addSql('ALTER TABLE factura_produs ADD idCategoriiCheltuieli INT NOT NULL, DROP id_categorii_cheltuieli');
}
}