Skip to content

Commit

Permalink
laravel 11 floating-point types
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdullahiAbdulkabir committed Oct 17, 2024
1 parent 854ff2a commit 7c33259
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit 7c33259

Please sign in to comment.