fix: set default morph key type

This commit is contained in:
b1ek 2024-08-30 07:19:38 +10:00
parent 7cd5f1c4da
commit 1e27b8447a
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,7 @@
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
return new class extends Migration return new class extends Migration
@ -11,6 +12,8 @@ return new class extends Migration
*/ */
public function up(): void public function up(): void
{ {
Builder::defaultMorphKeyType('uuid');
Schema::create('users', function (Blueprint $table) { Schema::create('users', function (Blueprint $table) {
$table->uuid('id')->primary(); $table->uuid('id')->primary();
$table->string('last_name'); $table->string('last_name');