app/DoctrineMigrations/Version20230116061053.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 Version20230116061053 extends AbstractMigration
  10. {
  11.     const NAME 'dtb_csv';
  12.     public function up(Schema $schema): void
  13.     {
  14.         if (!$schema->hasTable(self::NAME)) {
  15.             return;
  16.         }
  17.         $exists $this->connection->fetchOne("SELECT count(*) FROM dtb_csv WHERE csv_type_id = 1 AND entity_name = ? AND field_name = 'visible'", ['Eccube\\\\Entity\\\\ProductClass']);
  18.         if ($exists == 0) {
  19.             $this->addSql("INSERT INTO dtb_csv (csv_type_id, creator_id, entity_name, field_name, disp_name, sort_no, enabled, create_date, update_date, discriminator_type) VALUES (1, null, 'Eccube\\\\Entity\\\\ProductClass', 'visible', '商品規格表示フラグ', 32, false, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'csv')");
  20.         }
  21.     }
  22.     public function down(Schema $schema): void
  23.     {
  24.         // this down() migration is auto-generated, please modify it to your needs
  25.     }
  26. }