<?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 Version20240912083705 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 package ADD article_type_id INT DEFAULT NULL, DROP article_type');
$this->addSql('ALTER TABLE package ADD CONSTRAINT FK_DE686795289EC824 FOREIGN KEY (article_type_id) REFERENCES article_type (id)');
$this->addSql('CREATE INDEX IDX_DE686795289EC824 ON package (article_type_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE package DROP FOREIGN KEY FK_DE686795289EC824');
$this->addSql('DROP INDEX IDX_DE686795289EC824 ON package');
$this->addSql('ALTER TABLE package ADD article_type SMALLINT DEFAULT 1 NOT NULL, DROP article_type_id');
}
}