<?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 Version20250318171334 extends AbstractMigration
{
public function getDescription(): string
{
return 'Set null created dates in AbstractReservation entities to 2022-03-29 00:00:00';
}
public function up(Schema $schema): void
{
// Update null created dates in Reservation table
$this->addSql('UPDATE reservation SET created = "2022-03-29 00:00:00" WHERE created IS NULL');
// Update null created dates in Token table
$this->addSql('UPDATE token SET created = "2022-03-29 00:00:00" WHERE created IS NULL');
}
public function down(Schema $schema): void
{
// Cannot safely revert this migration as we don't know which records originally had NULL values
$this->write('This migration cannot be reverted');
}
}