<?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 Version20241211041232 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 `dp_workorder` ADD `product_variant_version_id` INT NULL AFTER `product_var_id`;");
$this->addSql("ALTER TABLE `dp_workorder` ADD FOREIGN KEY (`product_variant_version_id`) REFERENCES `dp_product_variant_versions`(`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql("ALTER TABLE `dp_workorder` DROP FOREIGN KEY `dp_workorder_ibfk_9`;");
$this->addSql("ALTER TABLE `dp_workorder` DROP COLUMN `product_variant_version_id`;");
}
}