3 use Illuminate\Database\Migrations\Migration;
4 use Illuminate\Database\Schema\Blueprint;
5 use Illuminate\Support\Facades\Schema;
7 return new class extends Migration
12 public function up(): void
14 Schema::create('sessions', function (Blueprint $table) {
15 $table->string('id')->unique();
16 $table->integer('user_id')->nullable();
17 $table->string('ip_address', 45)->nullable();
18 $table->text('user_agent')->nullable();
19 $table->text('payload');
20 $table->integer('last_activity');
25 * Reverse the migrations.
27 public function down(): void
29 Schema::dropIfExists('sessions');