fix: use uuid instead of PK
This commit is contained in:
parent
4fe830228e
commit
a9e0999811
|
@ -12,7 +12,7 @@ return new class extends Migration
|
|||
public function up(): void
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id()->type('uuid');
|
||||
$table->uuid('id')->primary();
|
||||
$table->string('last_name');
|
||||
$table->string('name');
|
||||
$table->string('middle_name');
|
||||
|
@ -23,7 +23,7 @@ return new class extends Migration
|
|||
});
|
||||
|
||||
Schema::create('passwords', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->uuid('id')->primary();
|
||||
$table->string('hash');
|
||||
$table->foreignId('user_id')->index();
|
||||
$table->timestamps();
|
||||
|
@ -36,7 +36,7 @@ return new class extends Migration
|
|||
});
|
||||
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->uuid('id')->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
$table->text('user_agent')->nullable();
|
||||
|
|
Loading…
Reference in New Issue