Skip to content

Commit 7c33259

Browse files
laravel 11 floating-point types
1 parent 854ff2a commit 7c33259

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

database/migrations/2017_01_01_112200_create_files_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function up()
1111
Schema::create('files', function (Blueprint $table) {
1212
$table->id();
1313

14-
$table->unsignedBigInteger('type_id');
14+
$table->bigInteger('type_id')->unsigned();
1515
$table->foreign('type_id')->references('id')->on('file_types');
1616

1717
$table->nullableMorphs('attachable');

database/migrations/2017_01_01_112400_create_uploads_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function up()
1111
Schema::create('uploads', function (Blueprint $table) {
1212
$table->increments('id');
1313

14-
$table->unsignedBigInteger('file_id')->nullable()->unique();
14+
$table->bigInteger('file_id')->unsigned()->nullable()->unique();
1515
$table->foreign('file_id')->references('id')->on('files')
1616
->onUpdate('restrict')->onDelete('restrict');
1717

database/migrations/2017_01_01_112600_create_favorite_files_table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ public function up()
1111
Schema::create('favorite_files', function (Blueprint $table) {
1212
$table->id();
1313

14-
$table->unsignedInteger('user_id')->index();
14+
$table->integer('user_id')->unsigned()->index();
1515
$table->foreign('user_id')->references('id')->on('users');
1616

17-
$table->unsignedBigInteger('file_id')->index();
17+
$table->bigInteger('file_id')->unsigned()->index();
1818
$table->foreign('file_id')->references('id')->on('files')
1919
->onUpdate('restrict')->onDelete('restrict');
2020

0 commit comments

Comments
 (0)