app/DoctrineMigrations/Version20240603134751.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.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20240603134751 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $sql = <<<SQL
  18.             INSERT INTO `mtb_estimate_item_type` (`id`, `name`, `sort_no`, `discriminator_type`) VALUES
  19.             (1, '商品', 0, 'estimateitemtype'),
  20.             (2, '送料', 1, 'estimateitemtype'),
  21.             (3, '手数料', 2, 'estimateitemtype'),
  22.             (4, '割引', 3, 'estimateitemtype'),
  23.             (5, '税', 4, 'estimateitemtype'),
  24.             (6, 'ポイント', 5, 'estimateitemtype');
  25.         SQL;
  26.         $this->addSql($sql);
  27.     }
  28.     public function down(Schema $schema): void
  29.     {
  30.         $this->addSql("DELETE FROM `mtb_estimate_item_type` WHERE id IN(1, 2, 3, 4, 5, 6)");
  31.     }
  32. }