feat: add reciprocal user blocking
CI / 🧪 Tests Laravel (push) Successful in 2m6s
CI / 🐳 Build & Push Image (push) Successful in 39s

This commit is contained in:
2026-08-11 15:58:31 +02:00
parent 6b757c37be
commit cef3e29ddc
15 changed files with 420 additions and 17 deletions
@@ -0,0 +1,32 @@
<?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::create('user_blocks', function (Blueprint $table) {
$table->id();
$table->foreignUlid('blocker_id')->constrained('users')->cascadeOnDelete();
$table->foreignUlid('blocked_id')->constrained('users')->cascadeOnDelete();
$table->timestamps();
$table->unique(['blocker_id', 'blocked_id']);
$table->index(['blocked_id', 'blocker_id']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('user_blocks');
}
};