app/DoctrineMigrations/Version20260113000001.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * 学校マスターに受験者情報呼び出し機能のON/OFFフラグを追加
  8.  */
  9. final class Version20260113000001 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '学校マスターに受験者情報呼び出し機能のON/OFFフラグ (examinee_lookup_enabled) を追加';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // dtb_schoolテーブルにexaminee_lookup_enabledカラムを追加
  18.         $this->addSql('ALTER TABLE dtb_school 
  19.             ADD examinee_lookup_enabled TINYINT(1) DEFAULT 0 NOT NULL COMMENT "受験者情報呼び出し機能ON/OFF (0:OFF, 1:ON)"');
  20.     }
  21.     public function down(Schema $schema): void
  22.     {
  23.         // カラムを削除
  24.         $this->addSql('ALTER TABLE dtb_school DROP examinee_lookup_enabled');
  25.     }
  26. }