From 399db1b647e14947e97a865c09215969f56a7efe Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Sat, 27 Apr 2013 12:31:40 -0400 Subject: [PATCH] Add db_prefix configuration option in place of db_table_*/db_sequence_* options Make possible to use db_prefix for schema initialization in Installer (#1489067) Fix updatedb.sh script so it recognizes also table prefix for external DDL files --- config/db.inc.php.dist | 50 +++++++++++++++++++++++--------------------------- 1 files changed, 23 insertions(+), 27 deletions(-) diff --git a/config/db.inc.php.dist b/config/db.inc.php.dist index fb6d2bb..17a273a 100644 --- a/config/db.inc.php.dist +++ b/config/db.inc.php.dist @@ -4,9 +4,12 @@ +-----------------------------------------------------------------------+ | Configuration file for database access | | | - | This file is part of the RoundCube Webmail client | - | Copyright (C) 2005, RoundCube Dev. - Switzerland | - | All rights reserved. | + | This file is part of the Roundcube Webmail client | + | Copyright (C) 2005-2012, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | | | +-----------------------------------------------------------------------+ @@ -14,33 +17,26 @@ $rcmail_config = array(); -// database engine (currently supported: mysql) -$rcmail_config['db_type'] = 'mysql'; +// PEAR database DSN for read/write operations +// format is db_provider://user:password@host/database +// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php +// currently supported db_providers: mysql, mysqli, pgsql, sqlite, mssql or sqlsrv -// database host -$rcmail_config['db_host'] = 'localhost'; +$rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail'; +// postgres example: 'pgsql://roundcube:pass@localhost/roundcubemail'; +// Warning: for SQLite use absolute path in DSN: +// sqlite example: 'sqlite:////full/path/to/sqlite.db?mode=0646'; -// database user -$rcmail_config['db_user'] = 'roundcube'; +// PEAR database DSN for read only operations (if empty write database will be used) +// useful for database replication +$rcmail_config['db_dsnr'] = ''; -// pwd -$rcmail_config['db_pass'] = 'pass'; +// use persistent db-connections +// beware this will not "always" work as expected +// see: http://www.php.net/manual/en/features.persistent-connections.php +$rcmail_config['db_persistent'] = FALSE; -// database name -$rcmail_config['db_name'] = 'roundcubemail'; - - -// you can define specific table names used to store webmail data -$rcmail_config['db_table_users'] = 'users'; - -$rcmail_config['db_table_identities'] = 'identities'; - -$rcmail_config['db_table_contacts'] = 'contacts'; - -$rcmail_config['db_table_session'] = 'session'; - -$rcmail_config['db_table_cache'] = 'cache'; - +// you can define specific table (and sequence) names prefix +$rcmail_config['db_prefix'] = ''; // end db config file -?> -- Gitblit v1.9.1