app/DoctrineMigrations/Version20240621073412.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 Version20240621073412 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $this->addSql("INSERT INTO dtb_product_rank (
  18.         id, code, `condition`, discriminator_type) VALUES
  19.             (1, 'N', '新品', 'productrank'),
  20.             (2, 'S', '新品同様(中古)', 'productrank'),
  21.             (3, 'A', '使用感少なくきれい', 'productrank'),
  22.             (4, 'B', '通常レベルの使用感有り', 'productrank'),
  23.             (5, 'C', '傷や汚れが多い', 'productrank'),
  24.             (6, 'D', 'ジャンク扱い', 'productrank');
  25.         ");
  26.     }
  27.     public function down(Schema $schema): void
  28.     {
  29.         $this->addSql("DELETE FROM dtb_product_rank WHERE id IN (1, 2, 3, 4, 5, 6)");
  30.     }
  31. }