This repository has been archived on 2026-11-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
thetool/db/migrations/20240822153505_create_mailtemplate.php
T

41 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateMailtemplate extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Mailtemplate");
$table->addColumn("name", "string", ["null" => false, "limit" => 255]);
$table->addColumn("description", "string", ["null" => true, "default" => true, "limit" => 1024]);
$table->addColumn("subject", "string", ["null" => false, "limit" => 255]);
$table->addColumn("body", "text", ["null" => false]);
$table->addColumn("note", "text", ["null" => false]);
$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("Mailtemplate")->drop()->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}