summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/application/config/database.php4
-rw-r--r--user_guide/changelog.html3
-rw-r--r--user_guide/database/configuration.html15
3 files changed, 19 insertions, 3 deletions
diff --git a/system/application/config/database.php b/system/application/config/database.php
index 28dfff5c9..fcdefda71 100644
--- a/system/application/config/database.php
+++ b/system/application/config/database.php
@@ -26,6 +26,8 @@
| ['cachedir'] The path to the folder where cache files should be stored
| ['char_set'] The character set used in communicating with the database
| ['dbcollat'] The character collation used in communicating with the database
+| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
+| ['autoinit'] Whether or not to automatically initialize the database.
| ['stricton'] TRUE/FALSE - forces "Strict Mode" connections
| - good for ensuring strict SQL while developing
|
@@ -51,6 +53,8 @@ $db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
+$db['default']['swap_pre'] = "";
+$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 822f394a9..95b1e6ccd 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -89,6 +89,9 @@ Hg Tag: </p>
</li>
<li>Database
<ul>
+ <li>Added <kbd>swap_pre</kbd> value to <a href="./database/configuration.html">database configuration</a>.</li>
+ <li>Added <kbd>autoinit</kbd> value to <a href="./database/configuration.html">database configuration</a>.</li>
+ <li>Added <kbd>stricton</kbd> value to <a href="./database/configuration.html">database configuration</a>.</li>
<li>Added <kbd>database_exists()</kbd> to the <a href="database/utilities.html">Database Utilities Class</a>.</li>
<li>Semantic change to db->version() function to allow a list of exceptions for databases with functions to return version string instead of specially formed SQL queries. Currently this list only includes Oracle and SQLite.</li>
<li>Fixed a bug where driver specific table identifier protection could lead to malformed queries in the <kbd>field_data()</kbd> functions.</li>
diff --git a/user_guide/database/configuration.html b/user_guide/database/configuration.html
index 4ef76ed14..1844aa057 100644
--- a/user_guide/database/configuration.html
+++ b/user_guide/database/configuration.html
@@ -78,7 +78,10 @@ $db['default']['db_debug'] = FALSE;<br />
$db['default']['cache_on'] = FALSE;<br />
$db['default']['cachedir'] = &quot;&quot;;<br />
$db['default']['char_set'] = "utf8";<br />
-$db['default']['dbcollat'] = "utf8_general_ci";</code>
+$db['default']['dbcollat'] = "utf8_general_ci";<br />
+$db['default']['swap_pre'] = "";<br />
+$db['default']['autoinit'] = TRUE;<br />
+$db['default']['stricton'] = FALSE;</code>
<p>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, production, test, etc.)
@@ -96,7 +99,10 @@ $db['test']['db_debug'] = FALSE;<br />
$db['test']['cache_on'] = FALSE;<br />
$db['test']['cachedir'] = &quot;&quot;;<br />
$db['test']['char_set'] = "utf8";<br />
-$db['test']['dbcollat'] = "utf8_general_ci";</code>
+$db['test']['dbcollat'] = "utf8_general_ci";<br />
+$db['test']['swap_pre'] = "";<br />
+$db['test']['autoinit'] = TRUE;<br />
+$db['test']['stricton'] = FALSE;</code>
<p>Then, to globally tell the system to use that group you would set this variable located in the config file:</p>
@@ -129,7 +135,10 @@ for the primary connection, but it too can be renamed to something more relevant
<li><strong>cachedir</strong> - The absolute server path to your database query cache directory.</li>
<li><strong>char_set</strong> - The character set used in communicating with the database.</li>
<li><strong>dbcollat</strong> - The character collation used in communicating with the database.</li>
-<li><strong>port</strong> - The database port number. Currently only used with the Postgres driver. To use this value you have to add a line to the database config array.<code>$db['default']['port'] = 5432;</code></li>
+<li><strong>swap_pre</strong> - A default table prefix that should be swapped with <var>dbprefix</var>. This is useful for distributed applications where you might run manually written queries, and need the prefix to still be customizable by the end user.</li>
+<li><strong>autoinit</strong> - Whether or not to automatically initialize the database.</li>
+<li><strong>stricton</strong> - TRUE/FALSE (boolean) - Whether to force "Strict Mode" connections, good for ensuring strict SQL while developing an application.</li>
+<li><strong>port</strong> - The database port number. Currently only used with the Postgres driver. To use this value you have to add a line to the database config array.<code>$db['default']['port'] = 5432;</code>
</ul>
<p class="important"><strong>Note:</strong> Depending on what database platform you are using (MySQL, Postgres, etc.)