]> BookStack Code Mirror - bookstack/blob - database/migrations/2017_01_21_163602_create_sessions_table.php
Merge pull request #5725 from BookStackApp/md_plaintext
[bookstack] / database / migrations / 2017_01_21_163602_create_sessions_table.php
1 <?php
2
3 use Illuminate\Database\Migrations\Migration;
4 use Illuminate\Database\Schema\Blueprint;
5 use Illuminate\Support\Facades\Schema;
6
7 return new class extends Migration
8 {
9     /**
10      * Run the migrations.
11      */
12     public function up(): void
13     {
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');
21         });
22     }
23
24     /**
25      * Reverse the migrations.
26      */
27     public function down(): void
28     {
29         Schema::dropIfExists('sessions');
30     }
31 };