producstion pause

This commit is contained in:
2026-09-15 15:46:32 +02:00
parent 4241d8e62b
commit cc24202937
6 changed files with 1125 additions and 82 deletions
@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class MakePauseReasonNullable extends AbstractMigration
{
public function up(): void
{
// La FK su reason_id è già stata rimossa e la colonna è già nullable.
// Garantisco lo stato finale in modo idempotente, senza ricreare la FK.
$this->table('production_pauses')
->changeColumn('reason_id', 'integer', ['null' => true])
->update();
}
public function down(): void
{
$this->table('production_pauses')
->changeColumn('reason_id', 'integer', ['null' => false])
->update();
}
}