Files
thetool/db/migrations/20240112120622_logging_communication.php
Spitzer Daniel c779a533b2 Zeiterfassung Urlaubstage
neue Migrations

Vorbereitung für Logging von versendeten SMSen und Mails zweck rate Limit
2024-01-14 13:16:54 +01:00

39 lines
1.2 KiB
PHP

<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class LoggingCommunication extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("LoggingCommunication", ["signed" => true]);
$table->addColumn("type", "integer", ["null" => false, "comment" => "1:Mail/2:SMS"]);
$table->addColumn("recipient", "text", ["null" => true]);
$table->addColumn("message", "text", ["null" => true]);
$table->addColumn("response", "text", ["null" => true]);
$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->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table("LoggingCommunication")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}