fixed multiple stuff
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user