2017-01-22 00:39:50 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
2021-06-26 23:23:15 +08:00
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
2017-01-22 00:39:50 +08:00
|
|
|
|
2023-02-07 00:58:29 +08:00
|
|
|
return new class extends Migration
|
2017-01-22 00:39:50 +08:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*/
|
2024-03-17 23:29:09 +08:00
|
|
|
public function up(): void
|
2017-01-22 00:39:50 +08:00
|
|
|
{
|
|
|
|
Schema::create('sessions', function (Blueprint $table) {
|
|
|
|
$table->string('id')->unique();
|
|
|
|
$table->integer('user_id')->nullable();
|
|
|
|
$table->string('ip_address', 45)->nullable();
|
|
|
|
$table->text('user_agent')->nullable();
|
|
|
|
$table->text('payload');
|
|
|
|
$table->integer('last_activity');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*/
|
2024-03-17 23:29:09 +08:00
|
|
|
public function down(): void
|
2017-01-22 00:39:50 +08:00
|
|
|
{
|
|
|
|
Schema::dropIfExists('sessions');
|
|
|
|
}
|
2023-02-07 00:58:29 +08:00
|
|
|
};
|