migrations/Version20230509133146.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\OperationalIntegrationManagement\InternalStatus\AbstractInternalStatusIdCompound;
  9. use Doctrine\DBAL\Schema\Schema;
  10. use Doctrine\Migrations\AbstractMigration;
  11. /**
  12.  * Auto-generated Migration: Please modify to your needs!
  13.  */
  14. final class Version20230509133146 extends AbstractMigration
  15. {
  16.     public function down(Schema $schema): void
  17.     {
  18.         // this down() migration is auto-generated, please modify it to your needs
  19.     }
  20.     public function getDescription(): string
  21.     {
  22.         return
  23.             "- Seeding of OIM internal status table.";
  24.     }
  25.     public function up(Schema $schema): void
  26.     {
  27.         // this up() migration is auto-generated, please modify it to your needs
  28.         $list '(\'' implode('\'),(\''AbstractInternalStatusIdCompound::ENABLED_CHOICES) . '\');';
  29.         $this->addSql(
  30.             "
  31.                 INSERT INTO oim_internal_status
  32.                     (id)
  33.                 VALUES
  34.                     $list
  35.             "
  36.         );
  37.     }
  38. }