<?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 Version20220802185156 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 product ADD model VARCHAR(255) NOT NULL, ADD model_alt VARCHAR(255) DEFAULT NULL, DROP name, DROP short_description, DROP regular_price, DROP short_description_alt, DROP name_alt');
$this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04AD44F5D008 FOREIGN KEY (brand_id) REFERENCES brand (id)');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04AD44F5D008');
$this->addSql('ALTER TABLE product ADD short_description VARCHAR(255) NOT NULL, ADD regular_price DOUBLE PRECISION DEFAULT NULL, ADD name_alt VARCHAR(255) DEFAULT NULL, CHANGE model name VARCHAR(255) NOT NULL, CHANGE model_alt short_description_alt VARCHAR(255) DEFAULT NULL');
}
}