diff --git a/config/services.yaml b/config/services.yaml index d8c64b7b..09794e3d 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -214,3 +214,12 @@ services: App\MyAreaBricks\Custom\Areabricks\: resource: '../src/MyAreaBricks/Custom/Areabricks/*' + + # --------------------------------------------------------- + # Use PdoSessionHandler for session storage + # --------------------------------------------------------- + Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler: + lazy: true + arguments: + - !service { class: PDO, factory: [ '@database_connection', 'getNativeConnection' ] } + - { lock_mode: 0 } \ No newline at end of file diff --git a/dump/data-0-bootstrap.sql b/dump/data-0-bootstrap.sql index 3e33e091..6aa1523a 100644 --- a/dump/data-0-bootstrap.sql +++ b/dump/data-0-bootstrap.sql @@ -3272,3 +3272,12 @@ CREATE TABLE `generic_execution_engine_error_log` ( FOREIGN KEY (jobRunId) REFERENCES generic_execution_engine_job_run (id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; + +DROP TABLE IF EXISTS `sessions`; +CREATE TABLE `sessions` ( + sess_id varbinary(128) NOT NULL PRIMARY KEY, + sess_data longblob NOT NULL, + sess_lifetime int unsigned NOT NULL, + sess_time int unsigned NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; +CREATE INDEX sess_lifetime_idx ON `sessions` (sess_lifetime);