Files
thetool/db/migrations/20241126203227_create_preorder_statusnotification_log.php
2024-11-26 22:11:34 +01:00

38 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreatePreorderStatusnotificationLog extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("PreorderStatusnotificationLog");
$table->addColumn("preorder_id", "integer", ["null" => false]);
$table->addColumn("status_code", "integer", ["null" => false]);
$table->addColumn("email", "string", ["null" => false, "limit" => 255]);
$table->addColumn("create_by", "integer", ["null" => false]);
$table->addColumn("edit_by", "integer", ["null" => false]);
$table->addColumn("create", "integer", ["null" => false]);
$table->addColumn("edit", "integer", ["null" => false]);
$table->create();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("PreorderStatusnotificationLog")->drop()->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}