app/DoctrineMigrations/Version20201218044542.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * This file is part of EC-CUBE
  5.  *
  6.  * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  7.  *
  8.  * http://www.ec-cube.co.jp/
  9.  *
  10.  * For the full copyright and license information, please view the LICENSE
  11.  * file that was distributed with this source code.
  12.  */
  13. namespace DoctrineMigrations;
  14. use Doctrine\DBAL\Schema\Schema;
  15. use Doctrine\Migrations\AbstractMigration;
  16. /**
  17.  * Auto-generated Migration: Please modify to your needs!
  18.  */
  19. final class Version20201218044542 extends AbstractMigration
  20. {
  21.     public function up(Schema $schema): void
  22.     {
  23. /*
  24.         $pointExists = $this->connection->fetchOne("SELECT COUNT(*) FROM dtb_csv WHERE csv_type_id = 2 AND field_name = 'point'");
  25.         if ($pointExists == 0) {
  26.             $sortNo = $this->connection->fetchOne('SELECT MAX(sort_no) + 1 FROM dtb_csv WHERE csv_type_id = 2');
  27.             $this->addSql("INSERT INTO dtb_csv (
  28.                 csv_type_id, creator_id, entity_name, field_name, disp_name, sort_no, enabled, create_date, update_date, discriminator_type
  29.             ) VALUES (
  30.                 2, null, ?, 'point', 'ポイント', $sortNo, false, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'csv'
  31.             )",
  32.             ['Eccube\\\\Entity\\\\Customer']);
  33.         }
  34. */
  35.     }
  36.     public function down(Schema $schema): void
  37.     {
  38.         // this down() migration is auto-generated, please modify it to your needs
  39.     }
  40. }