<?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 Version20230227002858 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 ingredient ADD ddefault_supplier_id INT DEFAULT NULL, ADD label_note LONGTEXT DEFAULT NULL');
$this->addSql('ALTER TABLE ingredient ADD CONSTRAINT FK_6BAF78704A1A379C FOREIGN KEY (ddefault_supplier_id) REFERENCES supplier (id)');
$this->addSql('CREATE INDEX IDX_6BAF78704A1A379C ON ingredient (ddefault_supplier_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE ingredient DROP FOREIGN KEY FK_6BAF78704A1A379C');
$this->addSql('DROP INDEX IDX_6BAF78704A1A379C ON ingredient');
$this->addSql('ALTER TABLE ingredient DROP ddefault_supplier_id, DROP label_note');
}
}