Files
thetool/db/migrations/20241223090000_warehouse_modify_7.php
2024-12-23 09:33:42 +01:00

34 lines
1.3 KiB
PHP

<?php declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class WarehouseModify7 extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("WarehouseOrderRequest");
$table->addColumn("anzahl", "integer", ["null" => false])
->addColumn("ware", "string", ["null" => false, "limit" => 255])
->addColumn("verwendungszweck", "text", ["null" => false])
->addColumn("create", "integer", ["null" => false])
->addColumn("createBy", "integer", ["null" => false])
->addColumn("distributorId", "integer", ["null" => false])
->addColumn("order", "integer", ["null" => true])
->addColumn("orderBy", "integer", ["null" => true])
->addColumn("takeOver", "integer", ["null" => true])
->addColumn("takeOverBy", "integer", ["null" => true])
->addColumn("warehouseLocation", "string", ["null" => true, "limit" => 255])
->addColumn("note", "text", ["null" => true])
->create();
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table("WarehouseOrderRequest")->drop()->save();
}
}
}