feat: replace custom discount with absolute value in favor of percentage

This commit is contained in:
2026-09-08 17:11:00 +02:00
parent d6c2cfaf1c
commit f8ff4b82a3
15 changed files with 105 additions and 50 deletions
+30
View File
@@ -0,0 +1,30 @@
<?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');
}
}