From 9d1589a954889dbd79391e99b00867bbd431c1ea Mon Sep 17 00:00:00 2001 From: Gustavo Novaro Date: Mon, 18 Mar 2024 18:37:33 +0100 Subject: [PATCH] fix(global): Fix missing session table migration --- .../2024_03_18_172658_create_session_table.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/database/migrations/2024_03_18_172658_create_session_table.php b/database/migrations/2024_03_18_172658_create_session_table.php index dce2e94..9fbe828 100644 --- a/database/migrations/2024_03_18_172658_create_session_table.php +++ b/database/migrations/2024_03_18_172658_create_session_table.php @@ -11,14 +11,16 @@ */ public function up(): void { - Schema::create('session', function (Blueprint $table) { - $table->string('id')->primary(); - $table->foreignId('user_id')->nullable()->index(); - $table->string('ip_address', 45)->nullable(); - $table->text('user_agent')->nullable(); - $table->longText('payload'); - $table->integer('last_activity')->index(); - }); + if(!Schema::hasTable('session')) { + Schema::create('session', function (Blueprint $table) { + $table->string('id')->primary(); + $table->foreignId('user_id')->nullable()->index(); + $table->string('ip_address', 45)->nullable(); + $table->text('user_agent')->nullable(); + $table->longText('payload'); + $table->integer('last_activity')->index(); + }); + } } /**