summaryrefslogtreecommitdiff
path: root/sites
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-06-28 19:57:34 +0000
committerDries Buytaert <dries@buytaert.net>2010-06-28 19:57:34 +0000
commit267ebfb7b61bd6a440e50649ebf6e3c1d36c9f84 (patch)
tree69f0b8531d81f07b3d61ba47e4721d4c1ac3c7b0 /sites
parent02b746382e55aa728760650eec2dd6f9a8e3239e (diff)
downloadbrdo-267ebfb7b61bd6a440e50649ebf6e3c1d36c9f84.tar.gz
brdo-267ebfb7b61bd6a440e50649ebf6e3c1d36c9f84.tar.bz2
- Patch #195416 by Damien Tournoud, David Strauss: table prefixes should be per database connection.
Diffstat (limited to 'sites')
-rw-r--r--sites/default/default.settings.php33
1 files changed, 18 insertions, 15 deletions
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
index 549898c6c..1b5fbd44d 100644
--- a/sites/default/default.settings.php
+++ b/sites/default/default.settings.php
@@ -61,6 +61,7 @@
* 'password' => 'password',
* 'host' => 'localhost',
* 'port' => 3306,
+ * 'prefix' => 'myprefix_',
* );
*
* The "driver" property indicates what Drupal database driver the
@@ -106,44 +107,45 @@
* 'username' => 'username',
* 'password' => 'password',
* 'host' => 'localhost',
+ * 'prefix' => 'main_',
* );
*
* You can optionally set prefixes for some or all database table names
- * by using the $db_prefix setting. If a prefix is specified, the table
+ * by using the 'prefix' setting. If a prefix is specified, the table
* name will be prepended with its value. Be sure to use valid database
* characters only, usually alphanumeric and underscore. If no prefixes
* are desired, leave it as an empty string ''.
*
- * To have all database names prefixed, set $db_prefix as a string:
+ * To have all database names prefixed, set 'prefix' as a string:
*
- * $db_prefix = 'main_';
+ * 'prefix' => 'main_',
*
- * To provide prefixes for specific tables, set $db_prefix as an array.
+ * To provide prefixes for specific tables, set 'prefix' as an array.
* The array's keys are the table names and the values are the prefixes.
- * The 'default' element holds the prefix for any tables not specified
- * elsewhere in the array. Example:
+ * The 'default' element is mandatory and holds the prefix for any tables
+ * not specified elsewhere in the array. Example:
*
- * $db_prefix = array(
+ * 'prefix' => array(
* 'default' => 'main_',
- * 'users' => 'shared_',
+ * 'users' => 'shared_',
* 'sessions' => 'shared_',
* 'role' => 'shared_',
* 'authmap' => 'shared_',
- * );
+ * ),
*
- * You can also use db_prefix as a reference to a schema/database. This maybe
+ * You can also use a reference to a schema/database as a prefix. This maybe
* useful if your Drupal installation exists in a schema that is not the default
* or you want to access several databases from the same code base at the same
* time.
* Example:
*
- * $db_prefix = array(
- * 'default' => 'main.',
- * 'users' => 'shared.',
+ * 'prefix' => array(
+ * 'default' => 'main.',
+ * 'users' => 'shared.',
* 'sessions' => 'shared.',
* 'role' => 'shared.',
* 'authmap' => 'shared.',
- * );
+ * );
*
* NOTE: MySQL and SQLite's definition of a schema is a database.
*
@@ -154,6 +156,7 @@
* 'username' => 'username',
* 'password' => 'password',
* 'host' => 'localhost',
+ * 'prefix' => '',
* );
* $databases['default']['default'] = array(
* 'driver' => 'pgsql',
@@ -161,6 +164,7 @@
* 'username' => 'username',
* 'password' => 'password',
* 'host' => 'localhost',
+ * 'prefix' => '',
* );
* $databases['default']['default'] = array(
* 'driver' => 'sqlite',
@@ -168,7 +172,6 @@
* );
*/
$databases = array();
-$db_prefix = '';
/**
* Access control for update.php script.