From 7c33259a3389fe7881916a31ffe4d4453959ff7d Mon Sep 17 00:00:00 2001 From: Abdullahi Abdul Kabir Date: Thu, 17 Oct 2024 16:53:45 +0100 Subject: [PATCH] laravel 11 floating-point types --- database/migrations/2017_01_01_112200_create_files_table.php | 2 +- .../migrations/2017_01_01_112400_create_uploads_table.php | 2 +- .../2017_01_01_112600_create_favorite_files_table.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/database/migrations/2017_01_01_112200_create_files_table.php b/database/migrations/2017_01_01_112200_create_files_table.php index 45466e4..39b1926 100644 --- a/database/migrations/2017_01_01_112200_create_files_table.php +++ b/database/migrations/2017_01_01_112200_create_files_table.php @@ -11,7 +11,7 @@ public function up() Schema::create('files', function (Blueprint $table) { $table->id(); - $table->unsignedBigInteger('type_id'); + $table->bigInteger('type_id')->unsigned(); $table->foreign('type_id')->references('id')->on('file_types'); $table->nullableMorphs('attachable'); diff --git a/database/migrations/2017_01_01_112400_create_uploads_table.php b/database/migrations/2017_01_01_112400_create_uploads_table.php index 7f4078b..0063b33 100644 --- a/database/migrations/2017_01_01_112400_create_uploads_table.php +++ b/database/migrations/2017_01_01_112400_create_uploads_table.php @@ -11,7 +11,7 @@ public function up() Schema::create('uploads', function (Blueprint $table) { $table->increments('id'); - $table->unsignedBigInteger('file_id')->nullable()->unique(); + $table->bigInteger('file_id')->unsigned()->nullable()->unique(); $table->foreign('file_id')->references('id')->on('files') ->onUpdate('restrict')->onDelete('restrict'); diff --git a/database/migrations/2017_01_01_112600_create_favorite_files_table.php b/database/migrations/2017_01_01_112600_create_favorite_files_table.php index 2cd6688..6395d41 100644 --- a/database/migrations/2017_01_01_112600_create_favorite_files_table.php +++ b/database/migrations/2017_01_01_112600_create_favorite_files_table.php @@ -11,10 +11,10 @@ public function up() Schema::create('favorite_files', function (Blueprint $table) { $table->id(); - $table->unsignedInteger('user_id')->index(); + $table->integer('user_id')->unsigned()->index(); $table->foreign('user_id')->references('id')->on('users'); - $table->unsignedBigInteger('file_id')->index(); + $table->bigInteger('file_id')->unsigned()->index(); $table->foreign('file_id')->references('id')->on('files') ->onUpdate('restrict')->onDelete('restrict');