35 lines
1.3 KiB
PHP
35 lines
1.3 KiB
PHP
<?php /** @noinspection ALL */
|
|
declare(strict_types = 1);
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class WarehouseModify19 extends AbstractMigration {
|
|
public function up(): void {
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$WarehouseEmailQueueTable = $this->table("WarehouseEmailQueue");
|
|
if (!$WarehouseEmailQueueTable->exists()) {
|
|
$WarehouseEmailQueueTable
|
|
->addColumn("from", "string", ["limit" => 255])
|
|
->addColumn("fromName", "string", ["limit" => 255])
|
|
->addColumn("to", "string", ["limit" => 255])
|
|
->addColumn("toName", "string", ["limit" => 255])
|
|
->addColumn("subject", "string", ["limit" => 255])
|
|
->addColumn("body", "text")
|
|
->addColumn("create", "integer")
|
|
->addColumn("createBy", "integer")
|
|
->addColumn("sent", "integer", ["default" => 0])
|
|
->create();
|
|
}
|
|
}
|
|
}
|
|
|
|
public function down(): void {
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$WarehouseEmailQueueTable = $this->table("WarehouseEmailQueue");
|
|
if ($WarehouseEmailQueueTable->exists()) {
|
|
$WarehouseEmailQueueTable->drop()->save();
|
|
}
|
|
}
|
|
}
|
|
}
|