26 lines
1.0 KiB
PHP
26 lines
1.0 KiB
PHP
<?php declare(strict_types = 1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class WarehouseModify15 extends AbstractMigration {
|
|
public function up(): void {
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$WarehouseShippingNoteTable = $this->table("WarehouseShippingNote");
|
|
$WarehouseShippingNoteTable
|
|
->changeColumn("billingAddressId", "integer", ["null" => true])
|
|
->changeColumn("status", "enum", ["values" => ['new', 'in_progress', 'accepted', 'invoiced', 'cancelled', 'on_hold']])
|
|
->save();
|
|
}
|
|
}
|
|
|
|
public function down(): void {
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$WarehouseShippingNoteTable = $this->table("WarehouseShippingNote");
|
|
$WarehouseShippingNoteTable
|
|
->changeColumn("billingAddressId", "integer", ["null" => false])
|
|
->changeColumn("status", "enum", ["values" => ['new', 'in_progress', 'accepted', 'invoiced']])
|
|
->save();
|
|
}
|
|
}
|
|
}
|