<?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 Version20260825104148 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 access_modules CHANGE access_module_role access_module_role ENUM(\'intern\', \'extern\') DEFAULT NULL');
$this->addSql('ALTER TABLE calculation_permissions CHANGE type type ENUM(\'total\', \'average\', \'profit\', \'margin\', \'detail_report\') NOT NULL');
$this->addSql('ALTER TABLE desktop_settings CHANGE default_language default_language ENUM(\'de\', \'en\', \'tr\') DEFAULT NULL');
$this->addSql('ALTER TABLE material_request CHANGE status status ENUM(\'draft\', \'submitted\', \'ordered\', \'partially_ordered\', \'rejected\') DEFAULT \'draft\' NOT NULL');
$this->addSql('ALTER TABLE material_request_documents ADD free_text LONGTEXT DEFAULT NULL, CHANGE file_name file_name VARCHAR(255) DEFAULT NULL, CHANGE file_path file_path VARCHAR(255) DEFAULT NULL, CHANGE status status ENUM(\'pending\', \'ordered\', \'partially_ordered\', \'rejected\') DEFAULT \'pending\' NOT NULL');
$this->addSql('ALTER TABLE project_order_task_fulfillment CHANGE execution_scope execution_scope ENUM(\'internal\', \'external\') DEFAULT NULL, CHANGE execution_work_nature execution_work_nature ENUM(\'support\', \'service\', \'production\') DEFAULT NULL, CHANGE status status ENUM(\'draft\', \'published\') DEFAULT \'draft\' NOT NULL, CHANGE decline_reason_category decline_reason_category ENUM(\'supply\', \'personnel\', \'weather\', \'scope_change\', \'other\') DEFAULT NULL');
$this->addSql('ALTER TABLE project_order_task_fulfillment_date_revisions CHANGE reason_category reason_category ENUM(\'supply\', \'personnel\', \'weather\', \'scope_change\', \'other\') DEFAULT NULL');
$this->addSql('ALTER TABLE project_order_task_fulfillment_messages CHANGE sender_side sender_side ENUM(\'owner\', \'executor\') NOT NULL');
$this->addSql('ALTER TABLE projects CHANGE type type ENUM(\'project\', \'daily_work\') DEFAULT \'project\'');
$this->addSql('ALTER TABLE purchase_request_histories CHANGE sender_mode sender_mode ENUM(\'approver\', \'requester\') DEFAULT NULL');
$this->addSql('ALTER TABLE purchase_request_status CHANGE status status ENUM(\'pending\', \'approved\', \'rejected\', \'delivered\') NOT NULL');
$this->addSql('ALTER TABLE stock_transactions CHANGE transaction_type transaction_type ENUM(\'in\', \'out\', \'move\') NOT NULL');
$this->addSql('ALTER TABLE task_fulfillment_stage_history CHANGE changed_by_scope changed_by_scope ENUM(\'internal\', \'external\') DEFAULT NULL, CHANGE source source ENUM(\'service\', \'erp\', \'system\') NOT NULL');
$this->addSql('ALTER TABLE task_fulfillment_stages CHANGE work_nature work_nature ENUM(\'support\', \'service\', \'production\') DEFAULT NULL');
$this->addSql('ALTER TABLE todo_notifications CHANGE status status ENUM(\'pending\', \'accepted\', \'in_process\', \'awaiting_confirmation\', \'completed\', \'rejected\') DEFAULT NULL, CHANGE type type ENUM(\'status\', \'comment\', \'new_todo\', \'case_closed\') DEFAULT \'status\' NOT NULL');
$this->addSql('ALTER TABLE todos CHANGE priority priority ENUM(\'low\', \'medium\', \'high\', \'critical\') NOT NULL, CHANGE type type ENUM(\'bug\', \'improvement\', \'suggestion\') NOT NULL, CHANGE status status ENUM(\'pending\', \'accepted\', \'in_process\', \'awaiting_confirmation\', \'completed\', \'rejected\') NOT NULL, CHANGE ai_status ai_status ENUM(\'queued\', \'in_progress\', \'done\', \'failed\') DEFAULT NULL');
$this->addSql('ALTER TABLE vendor CHANGE vendor_type vendor_type ENUM(\'company\', \'freelancer\') DEFAULT NULL, CHANGE vendor_status vendor_status ENUM(\'active\', \'inactive\') DEFAULT \'active\' NOT NULL');
$this->addSql('DROP INDEX unique_personal_id ON worker');
$this->addSql('CREATE UNIQUE INDEX unique_personal_id ON worker (personal_id)');
$this->addSql('ALTER TABLE works_plan_revisions CHANGE status status ENUM(\'requested\', \'granted\', \'denied\', \'submitted\', \'approved\', \'rejected\', \'withdrawn\') NOT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE access_modules CHANGE access_module_role access_module_role VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE calculation_permissions CHANGE type type VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE desktop_settings CHANGE default_language default_language VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE material_request CHANGE status status VARCHAR(255) DEFAULT \'draft\' NOT NULL');
$this->addSql('ALTER TABLE material_request_documents DROP free_text, CHANGE file_name file_name VARCHAR(255) NOT NULL, CHANGE file_path file_path VARCHAR(255) NOT NULL, CHANGE status status VARCHAR(255) DEFAULT \'pending\' NOT NULL');
$this->addSql('ALTER TABLE project_order_task_fulfillment CHANGE execution_scope execution_scope VARCHAR(255) DEFAULT NULL, CHANGE execution_work_nature execution_work_nature VARCHAR(255) DEFAULT NULL, CHANGE status status VARCHAR(255) DEFAULT \'draft\' NOT NULL, CHANGE decline_reason_category decline_reason_category VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE project_order_task_fulfillment_date_revisions CHANGE reason_category reason_category VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE project_order_task_fulfillment_messages CHANGE sender_side sender_side VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE projects CHANGE type type VARCHAR(255) DEFAULT \'project\'');
$this->addSql('ALTER TABLE purchase_request_histories CHANGE sender_mode sender_mode VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE purchase_request_status CHANGE status status VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE stock_transactions CHANGE transaction_type transaction_type VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE task_fulfillment_stage_history CHANGE changed_by_scope changed_by_scope VARCHAR(255) DEFAULT NULL, CHANGE source source VARCHAR(255) NOT NULL');
$this->addSql('ALTER TABLE task_fulfillment_stages CHANGE work_nature work_nature VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE todo_notifications CHANGE type type VARCHAR(255) DEFAULT \'status\' NOT NULL, CHANGE status status VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE todos CHANGE priority priority VARCHAR(255) NOT NULL, CHANGE type type VARCHAR(255) NOT NULL, CHANGE status status VARCHAR(255) NOT NULL, CHANGE ai_status ai_status VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE vendor CHANGE vendor_type vendor_type VARCHAR(255) DEFAULT NULL, CHANGE vendor_status vendor_status VARCHAR(255) DEFAULT \'active\' NOT NULL');
$this->addSql('DROP INDEX unique_personal_id ON worker');
$this->addSql('CREATE UNIQUE INDEX unique_personal_id ON worker (personal_id)');
$this->addSql('ALTER TABLE works_plan_revisions CHANGE status status VARCHAR(255) NOT NULL');
}
}