mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-10-14 23:02:05 +02:00
fix: fix prohibition migration (#1255)
This commit is contained in:
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');
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user