added new calendar meta to shipping note
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php /** @noinspection ALL */
|
||||
declare(strict_types = 1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class WarehouseModify24 extends AbstractMigration {
|
||||
public function up(): void {
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$WarehouseShippingNote = $this->table("WarehouseShippingNote");
|
||||
|
||||
if (!$WarehouseShippingNote->hasColumn("metadata")) {
|
||||
$WarehouseShippingNote
|
||||
->addColumn("metadata", "json", ["null" => true, "default" => null, "after" => "type"])
|
||||
->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void {
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$WarehouseShippingNote = $this->table("WarehouseShippingNote");
|
||||
|
||||
if ($WarehouseShippingNote->hasColumn("metadata")) {
|
||||
$WarehouseShippingNote
|
||||
->removeColumn("metadata")
|
||||
->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user