<?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 Version20240923092807 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql("UPDATE `dp_kpi`
SET `kpi_type` = 'basic', `visbility` = 'plan', `kpi_formula` = NULL
WHERE `kpi_id` = 37");
$this->addSql("UPDATE `dp_kpi` SET `visbility` = 'actual' , `kpi_status` = 'enabled' , `kpi_formula` = '_build_total_' , `kpi_name` = 'Daily Production Receipt' , `kpi_type` = 'derived'
WHERE `dp_kpi`.`kpi_id` = 36;");
$this->addSql("INSERT INTO `dp_oput_kpi_assign` (`uk_id`, `uk_kpi_id`, `product_id`, `product_var_id`, `uk_status`, `uk_created_at`, `uk_created_by`, `uk_updated_at`, `uk_updated_by`, `level_id`) VALUES (NULL, '36', NULL, NULL, 'enabled', '2024-09-23 11:20:44.000000', '1', NULL, NULL, '18'), (NULL, '36', NULL, NULL, 'enabled', '2024-09-23 11:20:44.000000', '1', NULL, NULL, '17');");
}
public function down(Schema $schema): void
{
$this->addSql("UPDATE `dp_kpi` SET `kpi_formula` = '_build_total_', `kpi_type` = 'derived', `visbility` = 'both' WHERE `dp_kpi`.`kpi_id` = 37");
$this->addSql("UPDATE `dp_kpi` SET `visbility` = 'actual' , `kpi_status` = 'disabled' , `kpi_formula` = NULL , `kpi_name` = 'Daily Production Target' , `kpi_type` = 'basic'
WHERE `dp_kpi`.`kpi_id` = 36;");
$this->addSql("DELETE FROM `dp_oput_kpi_assign` WHERE `uk_kpi_id` = '36' AND `uk_status` = 'enabled' AND `uk_created_at` = '2024-09-23 11:20:44.000000' AND `uk_created_by` = '1' AND `level_id` IN ('17', '18');");
}
}