neue Migrations Vorbereitung für Logging von versendeten SMSen und Mails zweck rate Limit
39 lines
1.2 KiB
PHP
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") {
|
|
|
|
}
|
|
}
|
|
}
|