1
0
mirror of https://github.com/flarum/core.git synced 2025-08-04 23:47:32 +02:00

feat: notification unsubscribe & email overhaul with HTML multipart (#3872)

This commit is contained in:
IanM
2023-09-29 16:34:54 +01:00
committed by GitHub
parent ec5cb98c77
commit 412cfafb3a
56 changed files with 927 additions and 155 deletions

View File

@@ -0,0 +1,30 @@
<?php
/*
* This file is part of Flarum.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
use Flarum\Database\Migration;
use Illuminate\Database\Schema\Blueprint;
return Migration::createTable(
'unsubscribe_tokens',
function (Blueprint $table) {
$table->id();
$table->unsignedInteger('user_id');
$table->string('email_type');
$table->string('token', 100)->unique();
$table->timestamp('unsubscribed_at')->nullable();
$table->timestamps();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->index('user_id');
$table->index('email_type');
$table->index('token');
$table->index(['user_id', 'email_type']);
}
);