add SMTP sender
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('sender_accounts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('email_address')->unique();
|
||||
$table->string('email_name')->nullable();
|
||||
$table->string('smtp_host')->nullable();
|
||||
$table->integer('smtp_port')->default(587);
|
||||
$table->string('smtp_encryption')->default('tls');
|
||||
$table->string('smtp_username')->nullable();
|
||||
$table->text('smtp_password')->nullable();
|
||||
$table->string('reply_to')->nullable();
|
||||
$table->string('verify_email')->nullable();
|
||||
$table->text('note')->nullable();
|
||||
$table->boolean('is_active')->default(true);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sender_accounts');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('mailing_messaggi', function (Blueprint $table) {
|
||||
$table->json('log_falliti')->nullable()->after('invii_falliti');
|
||||
$table->string('mittente_nome')->nullable()->after('log_falliti');
|
||||
$table->string('mittente_email')->nullable()->after('mittente_nome');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('mailing_messaggi', function (Blueprint $table) {
|
||||
$table->dropColumn(['log_falliti', 'mittente_nome', 'mittente_email']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user