fix: fix prohibition migration (#1255)

This commit is contained in:
Kyrch authored and GitHub committed 2026-09-12 18:35:16 -03:00
1 parent 6d24c2bb14
commit 00aad35d93
1 file changed
+2 -2
@@ -57,7 +57,7 @@ return new class extends Migration
});
Schema::create($tableNames['model_prohibitions'], function (Blueprint $table) use ($tableNames): void {
$table->morphs('model');
$table->morphs('user');
$table->unsignedBigInteger('prohibition_id');
$table->foreign('prohibition_id')->references('id')->on($tableNames['prohibition'])->cascadeOnDelete();
@@ -67,7 +67,7 @@ return new class extends Migration
$table->text('reason')->nullable();
$table->timestamps();
$table->primary(['model_type', 'model_id', 'prohibition_id']);
$table->primary(['user_type', 'user_id', 'prohibition_id']);
$table->index('expires_at');
});
}