<?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 Version20250116133436 extends AbstractMigration
{
public function getDescription(): string
{
return 'Replace "sending" with "pending" in the "status" field of the "event" table and "action" field of the "notification" table, only for rows where "checking_id" is not null.';
}
public function up(Schema $schema): void
{
$this->addSql("
UPDATE event
SET status = 'pending'
WHERE status = 'sending' AND checking_id IS NOT NULL
");
$this->addSql("
UPDATE notification
SET action = 'pending'
WHERE action = 'sending' AND order_id IS NOT NULL
");
}
}