app/DoctrineMigrations/Version20230807105157.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 Version20230807105157 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 mtb_chance (id, name, sort_no, discriminator_type) VALUES
  18.             (1, '日本の窓ホームページから知った', 1, 'chance'),
  19.             (2, '東京組ホームページから知った', 2, 'chance'),
  20.             (3, 'ネットでたまたま見つけた', 3, 'chance'),
  21.             (4, '雑誌やカタログから知った', 4, 'chance'),
  22.             (5, '友人や知り合いからのご紹介', 5, 'chance')
  23.             "
  24.         );
  25.     }
  26.     public function down(Schema $schema): void
  27.     {
  28.         $this->addSql("DELETE FROM mtb_chance WHERE id in (1, 2, 3, 4, 5)");
  29.     }
  30. }