WIP Mailtemplate 2024-08-22

This commit is contained in:
Frank Schubert
2024-08-23 11:12:57 +02:00
parent 789fe28fc5
commit 7af6d36bc1
6 changed files with 598 additions and 0 deletions
@@ -0,0 +1,40 @@
<?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") {
}
}
}