migrations/Version20221213133033.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\CoreModule\EmployeeLegalState\AbstractEmployeeLegalStateIdCompound;
  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 Version20221213133033 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 employee_legal_state 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('\'),(\''AbstractEmployeeLegalStateIdCompound::ENABLED_CHOICES) .
  32.             '\');';
  33.         $this->addSql(
  34.             "
  35.                 INSERT INTO employee_legal_state
  36.                     (id)
  37.                 VALUES
  38.                     $list
  39.             "
  40.         );
  41.     }
  42. }