<?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 Version20241219154628 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql("ALTER TABLE `dp_workorder_data_history` ADD `kpi_id` INT NULL AFTER `level_id`;");
$this->addSql("ALTER TABLE `dp_workorder_data_history` ADD FOREIGN KEY (`kpi_id`) REFERENCES `dp_kpi`(`kpi_id`) ON DELETE RESTRICT ON UPDATE RESTRICT");
}
public function down(Schema $schema): void
{
$this->addSql("ALTER TABLE `dp_workorder_data_history` DROP FOREIGN KEY `dp_workorder_data_history_ibfk_6`");
$this->addSql("ALTER TABLE `dp_workorder_data_history` DROP COLUMN `kpi_id`;");
}
}