Files
myep/migrations/Version20260707094812.php
T

32 lines
973 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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 Version20260707094812 extends AbstractMigration
{
public function getDescription(): string
{
return 'Drop children_count (45 J.) and rename adolescents_count to children_count (now 4X J.)';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE accommodation_booking DROP COLUMN children_count');
$this->addSql('ALTER TABLE accommodation_booking RENAME COLUMN adolescents_count TO children_count');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE accommodation_booking RENAME COLUMN children_count TO adolescents_count');
$this->addSql('ALTER TABLE accommodation_booking ADD COLUMN children_count INT NOT NULL DEFAULT 0');
}
}