<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20250930001000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add custom columns to dtb_customer: company_kana, last_name_kana, mobile_number, reason_register, uniform_usage, uniform_replacement_frequency, job_category, job_subcategory';
}
public function up(Schema $schema): void
{
$this->addSql("ALTER TABLE dtb_customer ADD company_kana VARCHAR(255) DEFAULT NULL");
$this->addSql("ALTER TABLE dtb_customer ADD last_name_kana VARCHAR(255) DEFAULT NULL");
$this->addSql("ALTER TABLE dtb_customer ADD mobile_number VARCHAR(32) DEFAULT NULL");
$this->addSql("ALTER TABLE dtb_customer ADD reason_register VARCHAR(255) DEFAULT NULL");
$this->addSql("ALTER TABLE dtb_customer ADD uniform_usage VARCHAR(255) DEFAULT NULL");
$this->addSql("ALTER TABLE dtb_customer ADD uniform_replacement_frequency SMALLINT DEFAULT NULL");
$this->addSql("ALTER TABLE dtb_customer ADD job_category INT(10) DEFAULT NULL");
$this->addSql("ALTER TABLE dtb_customer ADD job_subcategory INT(10) DEFAULT NULL");
$this->addSql("ALTER TABLE dtb_customer ADD customer_type TINYINT DEFAULT NULL");
$this->addSql("ALTER TABLE dtb_customer ADD reason_register_other VARCHAR(255) DEFAULT NULL");
$this->addSql("ALTER TABLE dtb_customer ADD uniform_usage_other VARCHAR(255) DEFAULT NULL");
}
public function down(Schema $schema): void
{
$this->addSql("ALTER TABLE dtb_customer DROP uniform_usage_other");
$this->addSql("ALTER TABLE dtb_customer DROP reason_register_other");
$this->addSql("ALTER TABLE dtb_customer DROP customer_type");
$this->addSql("ALTER TABLE dtb_customer DROP job_subcategory");
$this->addSql("ALTER TABLE dtb_customer DROP job_category");
$this->addSql("ALTER TABLE dtb_customer DROP uniform_replacement_frequency");
$this->addSql("ALTER TABLE dtb_customer DROP uniform_usage");
$this->addSql("ALTER TABLE dtb_customer DROP reason_register");
$this->addSql("ALTER TABLE dtb_customer DROP mobile_number");
$this->addSql("ALTER TABLE dtb_customer DROP last_name_kana");
$this->addSql("ALTER TABLE dtb_customer DROP company_kana");
}
}