<?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 Version20251103182829 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_packagetypes`
DROP FOREIGN KEY `pck_packagetypes_ibfk_1`;
ALTER TABLE `pck_packagetypes`
CHANGE COLUMN `billing_category_id` `billing_category_id` INT NOT NULL ;
ALTER TABLE `pck_packagetypes`
ADD CONSTRAINT `pck_packagetypes_ibfk_1`
FOREIGN KEY (`billing_category_id`)
REFERENCES `billing_categories` (`id`);");
$this->addSql("ALTER TABLE `billing_category_rates`
CHANGE COLUMN `date_time` `date_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ;");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql("ALTER TABLE `pck_packagetypes`
DROP FOREIGN KEY `pck_packagetypes_ibfk_1`;
ALTER TABLE `pck_packagetypes`
CHANGE COLUMN `billing_category_id` `billing_category_id` INT NULL ;
ALTER TABLE `pck_packagetypes`
ADD CONSTRAINT `pck_packagetypes_ibfk_1`
FOREIGN KEY (`billing_category_id`)
REFERENCES `billing_categories` (`id`);");
$this->addSql("ALTER TABLE `billing_category_rates`
CHANGE COLUMN `date_time` `date_time` DATETIME NOT NULL ");
}
}