Files
thetool/db/migrations/20251217120000_warehouse_stocktake_item_add_overwritten.php
2025-12-17 18:33:22 +01:00

26 lines
714 B
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class WarehouseStocktakeItemAddOverwritten extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table('WarehouseStocktakeItem');
$table->addColumn('overwrittenById', 'integer', ['null' => true, 'signed' => true, 'after' => 'scannedBy'])
->update();
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table('WarehouseStocktakeItem');
$table->removeColumn('overwrittenById')
->update();
}
}
}