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(); + }); + } } /**