From b99ef852addbb8dc970e3032853319168a0957c0 Mon Sep 17 00:00:00 2001
From: Tobias Adolph <mail@tobiasadolph.de>
Date: Wed, 3 Aug 2016 13:34:19 +0200
Subject: [PATCH] [TASK] Add Doc for swapping out tables

Resolves: #77377
Releases: master
Change-Id: I2f74765bcd4a08f42623d9ebfeefcf70fd908ca3
Reviewed-on: https://review.typo3.org/49342
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Sebastian Bumann <bumann.sebastian@gmail.com>
Tested-by: Sebastian Bumann <bumann.sebastian@gmail.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
---
 ...454-DoctrineDBALForDatabaseConnections.rst | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/typo3/sysext/core/Documentation/Changelog/8.1/Feature-75454-DoctrineDBALForDatabaseConnections.rst b/typo3/sysext/core/Documentation/Changelog/8.1/Feature-75454-DoctrineDBALForDatabaseConnections.rst
index 81831f33747d..43e4708d13ee 100644
--- a/typo3/sysext/core/Documentation/Changelog/8.1/Feature-75454-DoctrineDBALForDatabaseConnections.rst
+++ b/typo3/sysext/core/Documentation/Changelog/8.1/Feature-75454-DoctrineDBALForDatabaseConnections.rst
@@ -29,6 +29,40 @@ The :php:``Connection`` class provides convenience methods for ``insert``, ``sel
 equality comparisons (``WHERE "aField" = 'aValue') are supported. For complex statements it's
 required to use the :php:``QueryBuilder``.
 
+It is possible to swap tables out of the default database and use a specific setup (e.g.
+for logging or caching). This snippet of a LocalConfiguration could for exampe be used
+to swap the sys_log table out to another database or even another database server:
+
+.. code-block:: php
+
+    //LocalConfiguration.php
+    //[...]
+    'DB' => [
+        'Connections' => [
+            'Default' => [
+                'charset' => 'utf8',
+                'dbname' => 'default_dbname',
+                'driver' => 'mysqli',
+                'host' => 'default_host',
+                'password' => '***',
+                'port' => 3306,
+                'user' => 'default_user',
+            ],
+            'Syslog' => [
+                'charset' => 'utf8',
+                'dbname' => 'syslog_dbname',
+                'driver' => 'mysqli',
+                'host' => 'syslog_host',
+                'password' => '***',
+                'port' => 3306,
+                'user' => 'syslog_user',
+            ],
+        ],
+        'TableMapping' => [
+            'sys_log' => 'Syslog'
+        ]
+    ],
+    //[...]
 
 Impact
 ======
-- 
GitLab