Describe the bug
With the merge of pkp/pkp-lib#9566 , we have moved the whole session/cookie management utilising the Laravel's session toolset . As a result the sessions table migration also set as per what default laravel's session migration ships with . However some Dissimilarities has beep slipped into the session migration .
The latest default session migration from Laravel like
Schema::create('sessions', function (Blueprint $table) {
$table->comment('Session data for logged-in users.');
$table->string('id')->primary();
$table->bigInteger('user_id')->nullable();
$table->foreign('user_id', 'sessions_user_id')->references('user_id')->on('users')->onDelete('cascade');
$table->index(['user_id'], 'sessions_user_id');
$table->string('ip_address', 45)->nullable();
$table->string('user_agent', 255)->nullable();
$table->bigInteger('last_activity')->index();
$table->text('payload');
$table->unique(['id'], 'sessions_pkey');
});
few differences are
$table->text('user_agent')->nullable(); vs. $table->string('user_agent', 255)->nullable(); (text / string(...,255))
$table->longText('payload'); vs. $table->text('payload'); (longText / text)
$table->integer('last_activity')->index(); vs. $table->bigInteger('last_activity')->index(); (integer / bigInteger)
extra index $table->unique(['id'], 'sessions_pkey');, which triggers a bug in MariaDB 10.4
These dissimilarities probably not going to cause any issue but better to sync it with what laravel ships with as whole session/cookie toolset starting from 3.5.0 is based on Laravel's toolset .
Describe the bug With the merge of pkp/pkp-lib#9566 , we have moved the whole session/cookie management utilising the Laravel's session toolset . As a result the sessions table migration also set as per what default laravel's session migration ships with . However some Dissimilarities has beep slipped into the session migration .
The latest default session migration from Laravel like
where OJS/OMP/OPS session migration looks like
few differences are
$table->text('user_agent')->nullable();
vs.$table->string('user_agent', 255)->nullable();
(text / string(...,255))$table->longText('payload');
vs.$table->text('payload');
(longText / text)$table->integer('last_activity')->index();
vs.$table->bigInteger('last_activity')->index();
(integer / bigInteger)$table->unique(['id'], 'sessions_pkey');
, which triggers a bug in MariaDB 10.4These dissimilarities probably not going to cause any issue but better to sync it with what laravel ships with as whole session/cookie toolset starting from 3.5.0 is based on Laravel's toolset .
some more details at https://github.com/pkp/pkp-lib/issues/9566#issuecomment-2163313257
PR pkp-lib --> https://github.com/pkp/pkp-lib/pull/10057 ojs --> https://github.com/pkp/ojs/pull/4316