Files
thetool/db/migrations/20241209130000_warehouse_modify_5.php
2024-12-09 13:16:34 +01:00

34 lines
1.1 KiB
PHP

<?php /** @noinspection ALL */
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class WarehouseModify5 extends AbstractMigration {
public function up(): void {
if ($this->getEnvironment() == "thetool") {
$WarehouseHistory = $this->table("WarehouseHistory", ["signed" => true]);
$WarehouseHistory->changeColumn("old_value", "text", ["null" => true]);
$WarehouseHistory->changeColumn("new_value", "text", ["null" => true]);
$WarehouseHistory->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
public function down(): void {
if ($this->getEnvironment() == "thetool") {
$WarehouseHistory = $this->table("WarehouseHistory", ["signed" => true]);
$WarehouseHistory->changeColumn("old_value", "string", ["null" => true, "limit" => 255]);
$WarehouseHistory->changeColumn("new_value", "string", ["null" => true, "limit" => 255]);
$WarehouseHistory->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}