Files
myep/migrations/Version20260908161500.php
T

31 lines
936 B
PHP

<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* The percentage column is dropped rather than converted: it shipped with Version20260908145156
* but no booking was ever given a value, so there is nothing to carry over.
*/
final class Version20260908161500 extends AbstractMigration
{
public function getDescription(): string
{
return 'Store the accommodation booking total discount as an absolute amount in minor units instead of a percentage';
}
public function up(Schema $schema): void
{
$this->addSql('ALTER TABLE accommodation_booking DROP total_discount, ADD total_discount_amount INT DEFAULT NULL');
}
public function down(Schema $schema): void
{
$this->addSql('ALTER TABLE accommodation_booking DROP total_discount_amount, ADD total_discount INT DEFAULT NULL');
}
}