diff --git a/database/migrations/2024_08_28_141058_user_follows.php b/database/migrations/2024_08_28_141058_create_user_follows_table.php similarity index 61% rename from database/migrations/2024_08_28_141058_user_follows.php rename to database/migrations/2024_08_28_141058_create_user_follows_table.php index 7b7fca3..c8e07db 100644 --- a/database/migrations/2024_08_28_141058_user_follows.php +++ b/database/migrations/2024_08_28_141058_create_user_follows_table.php @@ -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(); }); }