File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ a second array argument to ``PdoSessionHandler``:
143143 The ``db_lifetime_col `` was introduced in Symfony 2.6. Prior to 2.6,
144144 this column did not exist.
145145
146- These are parameters that you must configure:
146+ These are parameters that you can configure:
147147
148148``db_table `` (default ``sessions ``):
149149 The name of the session table in your database;
@@ -216,8 +216,18 @@ Preparing the Database to Store Sessions
216216----------------------------------------
217217
218218Before storing sessions in the database, you must create the table that stores
219- the information. The following sections contain some examples of the SQL statements
220- you may use for your specific database engine.
219+ the information. The session handler provides a method called
220+ :method: `Symfony\\ Component\\ HttpFoundation\\ Session\\ Storage\\ Handler::createTable `
221+ to set up this table for you according to the database engine used::
222+
223+ try {
224+ $sessionHandlerService->createTable();
225+ } catch (\PDOException $e) {
226+ // the table could not be created for some reason
227+ }
228+
229+ If you prefer to set up the table yourself, these are some examples of the SQL
230+ statements you may use according to your specific database engine.
221231
222232.. _pdo-session-handle-26-changes :
223233
You can’t perform that action at this time.
0 commit comments