added new end of life

This commit is contained in:
2025-08-07 16:33:49 +02:00
parent 7ccba02756
commit 4a58cc44da
7 changed files with 88 additions and 17 deletions
@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class WarehouseArticleAddIsEndOfLife extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table("WarehouseArticle")
->addColumn("isEndOfLife", "integer", ["null" => false, "default" => 0, "after" => "criticalAmount"])
->update();
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table("WarehouseArticle")
->removeColumn("isEndOfLife")
->update();
}
}
}