app/DoctrineMigrations/Version20240524220800.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 Version20240524220800 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $sort_no $this->connection->fetchOne("SELECT sort_no FROM dtb_csv WHERE csv_type_id = 1 AND disp_name = '商品仕様(名入れ)画像'") + 1;
  18.         $this->addSql("UPDATE dtb_csv SET sort_no = sort_no + 1 WHERE csv_type_id = 1 AND sort_no >= {$sort_no}");
  19.         $this->addSql("UPDATE dtb_csv SET sort_no = {$sort_no} WHERE csv_type_id = 1 AND field_name = 'ProductNaireImages' AND reference_field_name = 'alt_text'");
  20.     }
  21.     public function down(Schema $schema): void
  22.     {
  23.     }
  24. }