migrations/Version20220502143634.php line 1

Open in your IDE?
  1. <?php
  2. /**
  3.  * @noinspection PhpUnused
  4.  * @noinspection PhpInternalEntityUsedInspection
  5.  */
  6. declare(strict_types=1);
  7. namespace DoctrineMigrations;
  8. use App\Validator\Constraints\Api\AccidentManagement\BodyPart\AbstractBodyPartIdCompound;
  9. use Doctrine\DBAL\Schema\Schema;
  10. use Doctrine\Migrations\AbstractMigration;
  11. /**
  12.  * Auto-generated Migration: Please modify to your needs!
  13.  *
  14.  * @package API
  15.  * @internal
  16.  */
  17. final class Version20220502143634 extends AbstractMigration
  18. {
  19.     public function down(Schema $schema): void
  20.     {
  21.         // this down() migration is auto-generated, please modify it to your needs
  22.     }
  23.     public function getDescription(): string
  24.     {
  25.         return
  26.             "- Seeding of body part table.";
  27.     }
  28.     public function up(Schema $schema): void
  29.     {
  30.         // this up() migration is auto-generated, please modify it to your needs
  31.         $list '(\'' implode('\'),(\''AbstractBodyPartIdCompound::ENABLED_CHOICES) . '\');';
  32.         $this->addSql(
  33.             "
  34.                 INSERT INTO body_part
  35.                     (id)
  36.                 VALUES
  37.                     $list
  38.             "
  39.         );
  40.     }
  41. }