<?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 Version20230523093016 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 payment ADD facturi_header_id INT NOT NULL, ADD paymeny_type_id INT NOT NULL');
$this->addSql('ALTER TABLE payment ADD CONSTRAINT FK_6D28840DEE4BB09B FOREIGN KEY (facturi_header_id) REFERENCES facturi_header (id)');
$this->addSql('ALTER TABLE payment ADD CONSTRAINT FK_6D28840D2D4A652E FOREIGN KEY (paymeny_type_id) REFERENCES payment_type (id)');
$this->addSql('CREATE INDEX IDX_6D28840DEE4BB09B ON payment (facturi_header_id)');
$this->addSql('CREATE INDEX IDX_6D28840D2D4A652E ON payment (paymeny_type_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE payment DROP FOREIGN KEY FK_6D28840DEE4BB09B');
$this->addSql('ALTER TABLE payment DROP FOREIGN KEY FK_6D28840D2D4A652E');
$this->addSql('DROP INDEX IDX_6D28840DEE4BB09B ON payment');
$this->addSql('DROP INDEX IDX_6D28840D2D4A652E ON payment');
$this->addSql('ALTER TABLE payment DROP facturi_header_id, DROP paymeny_type_id');
}
}