<?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 Version20221013074244 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 type CHANGE id id INT NOT NULL');
$this->addSql('ALTER TABLE order_item ADD CONSTRAINT FK_52EA1F09C54C8C93 FOREIGN KEY (type_id) REFERENCES type (id)');
$this->addSql('ALTER TABLE order_item ADD CONSTRAINT FK_52EA1F09828F83CA FOREIGN KEY (appropriate_id) REFERENCES appropriate (id)');
$this->addSql('ALTER TABLE partner ADD CONSTRAINT FK_312B3E168CDE5729 FOREIGN KEY (type) REFERENCES type (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE order_item DROP FOREIGN KEY FK_52EA1F09C54C8C93');
$this->addSql('ALTER TABLE order_item DROP FOREIGN KEY FK_52EA1F09828F83CA');
$this->addSql('ALTER TABLE partner DROP FOREIGN KEY FK_312B3E168CDE5729');
$this->addSql('ALTER TABLE type CHANGE id id INT AUTO_INCREMENT NOT NULL');
}
}