refactor: derive the bus escort from the travel date
This commit is contained in:
1 parent
2fc9806c69
commit
0e2021e96d
9 files changed
+59
-50
No files matched your search
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Drops the staffing matrix's Busbegleitung flag.
|
||||
*
|
||||
* Whether a date gets a bus escort follows from the date itself: one with boarding points has
|
||||
* bus travel, and App\Service\Assignment\AssignmentPlanner pre-selects the first of them. A flag
|
||||
* per product could only repeat that, and less precisely, since bus travel varies between the
|
||||
* dates of one product.
|
||||
*
|
||||
* Written by hand rather than taken from doctrine:migrations:diff, which also carries the
|
||||
* pre-existing drift of the dev database.
|
||||
*/
|
||||
final class Version20261016090000 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Drop staffing_rule.bus_escort';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE staffing_rule DROP bus_escort');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE staffing_rule ADD bus_escort TINYINT NOT NULL');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user