fix: use uuid instead of PK

This commit is contained in:
b1ek 2024-08-29 19:13:42 +10:00
parent 4fe830228e
commit a9e0999811
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 3 additions and 3 deletions

View File

@ -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();