app/DoctrineMigrations/Version20250106100000.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. final class Version20250106100000 extends AbstractMigration
  7. {
  8.     public function getDescription(): string
  9.     {
  10.         return 'Add product CSV column for delivery_date_days (発送日数).';
  11.     }
  12.     public function up(Schema $schema): void
  13.     {
  14.         $sql = <<<SQL
  15.             INSERT INTO dtb_csv
  16.             VALUES (null, 1, null, 'Eccube\\\\Entity\\\\ProductClass', 'delivery_date_days', null, '発送日数', 27, 1, NOW(), NOW(), 'csv')
  17.         SQL;
  18.         $this->addSql($sql);
  19.     }
  20.     public function down(Schema $schema): void
  21.     {
  22.         $sql = <<<SQL
  23.             DELETE FROM dtb_csv
  24.              WHERE entity_name = 'Eccube\\\\Entity\\\\ProductClass'
  25.                AND field_name = 'delivery_date_days'
  26.         SQL;
  27.         $this->addSql($sql);
  28.     }
  29. }