Files
thetool/db/migrations/20250114211027_create_mailtemplate_dispatch_log.php
2025-01-14 22:41:14 +01:00

39 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateMailtemplateDispatchLog extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$log = $this->table("MailtemplateDispatchLog");
$log->addColumn("mailtemplatedispatch_id", "integer", ["null" => false]);
$log->addColumn("email", "string", ["null" => false]);
$log->addColumn("sent", "integer", ["null" => false, "default" => 0]);
$log->addColumn("create_by", "integer", ["null" => false]);
$log->addColumn("edit_by", "integer", ["null" => false]);
$log->addColumn("create", "integer", ["null" => false]);
$log->addColumn("edit", "integer", ["null" => false]);
$log->create();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("MailtemplateDispatchLog")->drop()->save;
}
if($this->getEnvironment() == "addressdb") {
}
}
}