summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
authorFelix Balfoort <fhjbalfoort@gmail.com>2011-11-29 16:27:53 +0100
committerFelix Balfoort <fhjbalfoort@gmail.com>2011-11-29 16:27:53 +0100
commit85fe96df4dd7b7e163fae2d7e0420e750559e65c (patch)
tree9402fa279a8ae1df64ca6ab0a2755bc3a21061c2 /user_guide_src/source
parent1503c0f0ef8d9933418309cf742650b2c19c517d (diff)
Updated change log and and database configuration to include failover
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/changelog.rst1
-rw-r--r--user_guide_src/source/database/configuration.rst22
2 files changed, 23 insertions, 0 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 979755c06..5c7fd8d59 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -97,6 +97,7 @@ Release Date: Not Released
$this->db->like() in the :doc:`Database
Driver <database/active_record>`.
- Added $this->db->insert_batch() support to the OCI8 (Oracle) driver.
+ - Added failover if the main connections in the config should fail
- Libraries
diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst
index 687f0d920..a6bfc8979 100644
--- a/user_guide_src/source/database/configuration.rst
+++ b/user_guide_src/source/database/configuration.rst
@@ -28,6 +28,28 @@ prototype::
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
+You can also specify failovers for the situation when the main connection cannot connect for some reason.
+These failovers can be specified by setting the failover for a connection like this::
+
+ $db['default']['failover'][0]['hostname'] = 'localhost1';
+ $db['default']['failover'][0]['username'] = '';
+ $db['default']['failover'][0]['password'] = '';
+ $db['default']['failover'][0]['database'] = '';
+ $db['default']['failover'][0]['dbdriver'] = 'mysql';
+ $db['default']['failover'][0]['dbprefix'] = '';
+ $db['default']['failover'][0]['pconnect'] = TRUE;
+ $db['default']['failover'][0]['db_debug'] = TRUE;
+ $db['default']['failover'][0]['cache_on'] = FALSE;
+ $db['default']['failover'][0]['cachedir'] = '';
+ $db['default']['failover'][0]['char_set'] = 'utf8';
+ $db['default']['failover'][0]['dbcollat'] = 'utf8_general_ci';
+ $db['default']['failover'][0]['swap_pre'] = '';
+ $db['default']['failover'][0]['autoinit'] = TRUE;
+ $db['default']['failover'][0]['stricton'] = FALSE;
+ $db['default']['failover'][0]['failover'] = array();
+
+You can specify as much failovers as you like.
+
The reason we use a multi-dimensional array rather than a more simple
one is to permit you to optionally store multiple sets of connection
values. If, for example, you run multiple environments (development,