<?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 Version20231116125615 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 item ADD main_color_id INT DEFAULT NULL, ADD anti_theft_marking VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE item ADD CONSTRAINT FK_1F1B251EA3F80EC0 FOREIGN KEY (main_color_id) REFERENCES select_values (id)');
$this->addSql('CREATE INDEX IDX_1F1B251EA3F80EC0 ON item (main_color_id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE item DROP FOREIGN KEY FK_1F1B251EA3F80EC0');
$this->addSql('DROP INDEX IDX_1F1B251EA3F80EC0 ON item');
$this->addSql('ALTER TABLE item DROP main_color_id, DROP anti_theft_marking');
}
}