<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
final class Version20260611210219 extends AbstractMigration
{
public function getDescription(): string
{
return 'Filling data for shopInfo field';
}
public function up(Schema $schema): void
{
$this->addSql("
UPDATE `order` o
INNER JOIN shop s ON s.id = o.shop_id
SET o.shop_info = JSON_OBJECT(
'name', s.name,
'timezone', s.time_zone
)
WHERE o.shop_info IS NULL
");
}
}