<?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 Version20240930101132 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$this->addSql("INSERT INTO `tc_user_roles` (`id`, `role_key`, `category`, `role`, `is_active`, `is_deleted`) VALUES (NULL, 'ROLE_PRODUCT_MANAGEMENT', 'PRODUCT_MANAGEMENT', 'PRODUCT_MANAGEMENT', '1', '0');");
$this->addSql("INSERT INTO `tc_user_roles` (`id`, `role_key`, `category`, `role`, `is_active`, `is_deleted`) VALUES (NULL, 'ROLE_PRODUCT_VARIANT_MANAGEMENT', 'PRODUCT_MANAGEMENT', 'PRODUCT_VARIANT_MANAGEMENT', '1', '0');");
$this->addSql("INSERT INTO `tc_user_roles` (`id`, `role_key`, `category`, `role`, `is_active`, `is_deleted`) VALUES (NULL, 'ROLE_CUSTOMER_MANAGEMENT', 'CUSTOMER_MANAGEMENT', 'CUSTOMER_MANAGEMENT', '1', '0');");
$this->addSql("INSERT INTO `tc_user_roles` (`id`, `role_key`, `category`, `role`, `is_active`, `is_deleted`) VALUES (NULL, 'ROLE_BOARD_SETTINGS', 'PRODUCTION_PROCESS', 'BOARD_SETTINGS', '1', '0');");
$this->addSql("INSERT INTO `tc_user_roles` (`id`, `role_key`, `category`, `role`, `is_active`, `is_deleted`) VALUES (NULL, 'ROLE_ASSY_STOCK_MANAGEMENT', 'PRODUCTION_PROCESS', 'ASSY_STOCK_MANAGEMENT', '1', '0');");
$this->addSql("INSERT INTO `tc_user_roles` (`id`, `role_key`, `category`, `role`, `is_active`, `is_deleted`) VALUES (NULL, 'ROLE_SMT_STOCK_MANAGEMENT', 'PRODUCTION_PROCESS', 'SMT_STOCK_MANAGEMENT', '1', '0');");
$this->addSql("INSERT INTO `tc_user_roles` (`id`, `role_key`, `category`, `role`, `is_active`, `is_deleted`) VALUES (NULL, 'ROLE_DAILY_PLAN', 'PRODUCTION_PLAN', 'DAILY_PLAN', '1', '0'), (NULL, 'ROLE_WORKORDER_DETAILS', 'PRODUCTION_PLAN', 'WORKORDER_DETAILS', '1', '0');");
$this->addSql("INSERT INTO `tc_user_roles` (`id`, `role_key`, `category`, `role`, `is_active`, `is_deleted`) VALUES (NULL, 'ROLE_DOWNTIME_PLANNING', 'PRODUCTION_PLAN', 'DOWNTIME_PLANNING', '1', '0'), (NULL, 'ROLE_IMPORT_HISTORY', 'PRODUCTION_PLAN', 'IMPORT_HISTORY', '1', '0');");
$this->addSql("INSERT INTO `tc_user_roles` (`id`, `role_key`, `category`, `role`, `is_active`, `is_deleted`) VALUES (NULL, 'ROLE_RUNNING_ORDER', 'REPORT', 'RUNNING_ORDER', '1', '0'), (NULL, 'ROLE_MASTER_PRODUCTION_SCHEDLE_REPORT', 'REPORT', 'MASTER_PRODUCTION_SCHEDLE_REPORT', '1', '0');");
$this->addSql("INSERT INTO `tc_user_roles` (`id`, `role_key`, `category`, `role`, `is_active`, `is_deleted`) VALUES (NULL, 'ROLE_ACTIVITY_LOG', 'REPORT', 'ACTIVITY_LOG', '1', '0');");
$this->addSql("INSERT INTO `tc_user_roles` (`id`, `role_key`, `category`, `role`, `is_active`, `is_deleted`) VALUES (NULL, 'ROLE_MANAGE_SHIFT', 'CAPACITY_PLANNING', 'MANAGE_SHIFT', '1', '0'), (NULL, 'ROLE_OEE_DAILY_TARGET', 'CAPACITY_PLANNING', 'OEE_DAILY_TARGET', '1', '0');");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '0' WHERE `tc_user_roles`.`role_key` = 'ROLE_OPERATOR_SETTINGS';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '0' WHERE `tc_user_roles`.`role_key` = 'ROLE_LINE_MANAGER_SETTINGS';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '0' WHERE `tc_user_roles`.`role_key` = 'ROLE_TAKT_CONFIG';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '0' WHERE `tc_user_roles`.`role_key` = 'ROLE_PRJCT_CONFIG';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '0' WHERE `tc_user_roles`.`role_key` = 'ROLE_ACTION_SETTINGS';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '0' WHERE `tc_user_roles`.`role_key` = 'ROLE_KPI_DASHBOARD_FITLERS_SETTINGS';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '0' WHERE `tc_user_roles`.`role_key` = 'ROLE_KPI_DASHBOARD';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '0' WHERE `tc_user_roles`.`role_key` = 'ROLE_TL_DASHBOARD_FITLERS_SETTINGS';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '0' WHERE `tc_user_roles`.`role_key` = 'ROLE_TL_DASHBOARD';");
}
public function down(Schema $schema): void
{
$this->addSql("DELETE FROM `tc_user_roles` WHERE `role_key` = 'ROLE_PRODUCT_MANAGEMENT';");
$this->addSql("DELETE FROM `tc_user_roles` WHERE `role_key` = 'ROLE_PRODUCT_VARIANT_MANAGEMENT';");
$this->addSql("DELETE FROM `tc_user_roles` WHERE `role_key` = 'ROLE_CUSTOMER_MANAGEMENT';");
$this->addSql("DELETE FROM `tc_user_roles` WHERE `role_key` = 'ROLE_BOARD_SETTINGS';");
$this->addSql("DELETE FROM `tc_user_roles` WHERE `role_key` = 'ROLE_ASSY_STOCK_MANAGEMENT';");
$this->addSql("DELETE FROM `tc_user_roles` WHERE `role_key` = 'ROLE_SMT_STOCK_MANAGEMENT';");
$this->addSql("DELETE FROM `tc_user_roles` WHERE `role_key` IN ('ROLE_DAILY_PLAN', 'ROLE_WORKORDER_DETAILS');");
$this->addSql("DELETE FROM `tc_user_roles` WHERE `role_key` IN ('ROLE_DOWNTIME_PLANNING', 'ROLE_IMPORT_HISTORY');");
$this->addSql("DELETE FROM `tc_user_roles` WHERE `role_key` IN ('ROLE_RUNNING_ORDER', 'ROLE_MASTER_PRODUCTION_SCHEDLE_REPORT');");
$this->addSql("DELETE FROM `tc_user_roles` WHERE `role_key` = 'ROLE_ACTIVITY_LOG';");
$this->addSql("DELETE FROM `tc_user_roles` WHERE `role_key` IN ('ROLE_MANAGE_SHIFT', 'ROLE_OEE_DAILY_TARGET');");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '1' WHERE `role_key` = 'ROLE_OPERATOR_SETTINGS';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '1' WHERE `role_key` = 'ROLE_LINE_MANAGER_SETTINGS';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '1' WHERE `role_key` = 'ROLE_TAKT_CONFIG';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '1' WHERE `role_key` = 'ROLE_PRJCT_CONFIG';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '1' WHERE `role_key` = 'ROLE_ACTION_SETTINGS';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '1' WHERE `role_key` = 'ROLE_KPI_DASHBOARD_FITLERS_SETTINGS';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '1' WHERE `role_key` = 'ROLE_KPI_DASHBOARD';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '1' WHERE `role_key` = 'ROLE_TL_DASHBOARD_FITLERS_SETTINGS';");
$this->addSql("UPDATE `tc_user_roles` SET `is_active` = '1' WHERE `role_key` = 'ROLE_TL_DASHBOARD';");
}
}