<?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 Version20251023123450 extends AbstractMigration
{
public function getDescription(): string
{
return 'Permite que los campos fecha_primer_intento y fecha_ultimo_intento de la tabla blacklist puedan ser NULL';
}
public function up(Schema $schema): void
{
// Modificar columnas para permitir valores NULL
$this->addSql('ALTER TABLE blacklist MODIFY fecha_primer_intento DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE blacklist MODIFY fecha_ultimo_intento DATETIME DEFAULT NULL');
$this->addSql('ALTER TABLE blacklist CHANGE COLUMN fecha_ultimo_intento fecha_primer_intento_ventana_permante DATETIME DEFAULT NULL');
}
public function down(Schema $schema): void
{
// Revertir columnas a NOT NULL
$this->addSql('ALTER TABLE blacklist CHANGE COLUMN fecha_primer_intento_ventana_permante fecha_ultimo_intento DATETIME NOT NULL');
$this->addSql('ALTER TABLE blacklist MODIFY fecha_primer_intento DATETIME NOT NULL');
}
}