26 lines
878 B
PHP
26 lines
878 B
PHP
<?php declare(strict_types = 1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class WarehouseModify18 extends AbstractMigration {
|
|
public function up(): void {
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$WarehouseShippingNoteTable = $this->table("WarehouseShippingNote");
|
|
$WarehouseShippingNoteTable
|
|
->changeColumn("type", "string", ["limit" => 255, "default" => null])
|
|
->save();
|
|
}
|
|
}
|
|
|
|
public function down(): void {
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$WarehouseShippingNoteTable = $this->table("WarehouseShippingNote");
|
|
if ($WarehouseShippingNoteTable->hasColumn("type")) {
|
|
$WarehouseShippingNoteTable
|
|
->changeColumn("type", "string", ["limit" => 255])
|
|
->save();
|
|
}
|
|
}
|
|
}
|
|
}
|