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:
@@ -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']);
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user