mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 12:10:41 -05:00
Simplifies user_follows
Table Columns
The column and FK can be defined together using the `foreignId` method.
This commit is contained in:
parent
09e9e15c5e
commit
7c4753d38e
@ -13,10 +13,8 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('user_follows', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('follower_id');
|
||||
$table->unsignedBigInteger('following_id');
|
||||
$table->foreign('follower_id')->references('id')->on('users')->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->foreign('following_id')->references('id')->on('users')->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->foreignId('follower_id')->references('id')->on('users')->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->foreignId('following_id')->references('id')->on('users')->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user