<?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 Version20250722071957 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$now = (new \DateTime())->format('Y-m-d H:i:s');
$this->addSql("
INSERT INTO std_options (
created_by, updated_by, machine_name, order_value, path, is_active, created_date, updated_date, menu_section, dropdown_section, icon, name, external_link
)
SELECT 1, 1, 'approval_workflow', 4, 'admin_approvals', 1, '$now', '$now', 'navigation', null, 'search', 'approval_workflow', null
WHERE NOT EXISTS (
SELECT 1 FROM std_options WHERE machine_name = 'approval_workflow'
)
");
}
public function down(Schema $schema): void
{
$this->addSql("DELETE FROM std_options WHERE machine_name = 'approval_workflow'");
}
}