Skip to content

Commit

Permalink
fix(global): Fix missing session table migration
Browse files Browse the repository at this point in the history
  • Loading branch information
gnovaro committed Mar 18, 2024
1 parent 7c4c08f commit 9d1589a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions database/migrations/2024_03_18_172658_create_session_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}
}

/**
Expand Down

0 comments on commit 9d1589a

Please sign in to comment.