Skip to content

Commit

Permalink
Add doctrine session handler config + db schema (#586)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexz707 authored Jul 4, 2024
1 parent dd87c3c commit 35cbb69
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
9 changes: 9 additions & 0 deletions dump/data-0-bootstrap.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 35cbb69

Please sign in to comment.