<?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 Version20241031054130 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql("ALTER TABLE `notification_log` DROP COLUMN `shipping_date`;");
$this->addSql("ALTER TABLE `notification_log` ADD `downtime_planning_id` INT NULL DEFAULT NULL AFTER `workorder_id`;");
$this->addSql("ALTER TABLE `notification_log` ADD CONSTRAINT `notification_log_ibfk_4`
FOREIGN KEY (`downtime_planning_id`) REFERENCES `dp_downtime_planning`(`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;");
}
public function down(Schema $schema): void
{
$this->addSql("ALTER TABLE `notification_log` ADD COLUMN IF NOT EXISTS `shipping_date` DATE NULL;");
$this->addSql("ALTER TABLE `notification_log` DROP FOREIGN KEY `notification_log_ibfk_4`;");
$this->addSql("ALTER TABLE notification_log DROP COLUMN downtime_planning_id");
}
}