add auth sessions

This commit is contained in:
Yisroel Baum 2026-07-31 09:51:39 +03:00
parent a37c8da555
commit 34e26f81f5
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
9 changed files with 243 additions and 0 deletions

View file

@ -0,0 +1,25 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('auth_sessions', function (Blueprint $table): void {
$table->string('token', 64)->primary();
$table->foreignId('user_id')
->constrained('users')
->cascadeOnDelete();
$table->timestamp('created_at');
$table->timestamp('expires_at')->index();
});
}
public function down(): void
{
Schema::dropIfExists('auth_sessions');
}
};