Files
thetool/db/migrations/20241112155250_create_maintenancenotificationtemplate.php
2024-11-12 18:31:21 +01:00

38 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateMaintenancenotificationtemplate extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("MaintenanceNotificationTemplate");
$table->addColumn("subject", "string", ["null" => false]);
$table->addColumn("text", "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("MaintenanceNotificationTemplate")->drop()->save();
}
if($this->getEnvironment() == "addressdb") {
}
}
}