[TASK] Add Doc for swapping out tables 42/49342/2
authorTobias Adolph <mail@tobiasadolph.de>
Wed, 3 Aug 2016 11:34:19 +0000 (13:34 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Wed, 3 Aug 2016 11:58:08 +0000 (13:58 +0200)
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>
typo3/sysext/core/Documentation/Changelog/8.1/Feature-75454-DoctrineDBALForDatabaseConnections.rst

index 81831f3..43e4708 100644 (file)
@@ -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
 ======