<?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 Version20221121124255 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 proforma ADD company_id INT NOT NULL');
$this->addSql('ALTER TABLE proforma ADD CONSTRAINT FK_8383AFD6979B1AD6 FOREIGN KEY (company_id) REFERENCES company (id)');
$this->addSql('CREATE INDEX IDX_8383AFD6979B1AD6 ON proforma (company_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE proforma DROP FOREIGN KEY FK_8383AFD6979B1AD6');
$this->addSql('DROP INDEX IDX_8383AFD6979B1AD6 ON proforma');
$this->addSql('ALTER TABLE proforma DROP company_id');
}
}