<?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 Version20241205112233 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql("ALTER TABLE `dp_data_temp` ADD `product_var_id` INT NULL DEFAULT NULL AFTER `import_id`;");
$this->addSql("ALTER TABLE `dp_data_temp` ADD CONSTRAINT `dp_data_temp_ibfk_5` FOREIGN KEY (`product_var_id`) REFERENCES `dp_product_variants`(`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;");
}
public function down(Schema $schema): void
{
$this->addSql("ALTER TABLE `dp_data_temp` DROP FOREIGN KEY `dp_data_temp_ibfk_5`;");
$this->addSql("ALTER TABLE `dp_data_temp` DROP COLUMN `product_var_id`;");
}
}