<?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 Version20251202095620 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql("ALTER TABLE `pck_packages`
ADD COLUMN `fulfilled` TINYINT NULL AFTER `expiration_date`,
CHANGE COLUMN `expiration_reason` `fulfilled_reason` VARCHAR(45) NULL DEFAULT NULL ;
");
$this->addSql("update pck_packages set fulfilled = 1 where fulfilled_reason is not null;");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql("ALTER TABLE `pck_packages`
DROP COLUMN `fulfilled`,
CHANGE COLUMN `fulfilled_reason` `expiration_reason` VARCHAR(45) NULL DEFAULT NULL ;
");
}
}