<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20240525001000 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
$sort_no = $this->connection->fetchOne("SELECT sort_no FROM dtb_csv WHERE csv_type_id = 1 AND disp_name = '商品画像'") + 1;
$this->addSql("UPDATE dtb_csv SET sort_no = sort_no + 1 WHERE csv_type_id = 1 AND sort_no >= {$sort_no}");
$this->addSql("UPDATE dtb_csv SET sort_no = {$sort_no} WHERE csv_type_id = 1 AND field_name = 'ProductImage' AND reference_field_name = 'alt_text'");
}
public function down(Schema $schema): void
{
}
}