<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260601093000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add admin settings for the global SMS Mode API key';
}
public function up(Schema $schema): void
{
$this->addSql('CREATE TABLE admin_setting (id INT AUTO_INCREMENT NOT NULL, code VARCHAR(100) NOT NULL, setting_value LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, UNIQUE INDEX UNIQ_5B483A1177153098 (code), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql("INSERT INTO admin_setting (code, setting_value, created_at, updated_at) VALUES ('sms_mode_api_key', NULL, NOW(), NOW())");
}
public function down(Schema $schema): void
{
$this->addSql('DROP TABLE admin_setting');
}
}