add auth sessions
This commit is contained in:
parent
a37c8da555
commit
34e26f81f5
9 changed files with 243 additions and 0 deletions
|
|
@ -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');
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue