Add ability to delete comments by moderators

This commit is contained in:
2026-05-06 19:02:50 +02:00
parent 59cb39ca77
commit fdf26604f3
9 changed files with 127 additions and 33 deletions

View File

@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('comments', function (Blueprint $table) {
$table->bigInteger('deleted_by_moderator_id')
->nullable()
->after('parent_id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('comments', function (Blueprint $table) {
$table->dropColumn('deleted_by_moderator_id');
});
}
};