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'); diff --git a/tests/features/FileTest.php b/tests/features/FileTest.php index 8f90a62..d93e3e5 100644 --- a/tests/features/FileTest.php +++ b/tests/features/FileTest.php @@ -126,7 +126,7 @@ private function createTestTable(): self Schema::create('attachable_models', function ($table) { $table->increments('id'); - $table->unsignedBigInteger('file_id')->nullable(); + $table->bigInteger('file_id')->unsigned()->nullable(); $table->foreign('file_id')->references('id')->on('files') ->onUpdate('restrict')->onDelete('restrict');