Commit c9c0d0f6 authored by mathieu's avatar mathieu Committed by anarcat

Adding a global db_prefix options to override the current "site_" prefix

Signed-off-by: anarcat's avataranarcat <anarcat@koumbit.org>
parent c92ad85f
......@@ -119,7 +119,7 @@ function _provision_mysql_flush_privileges() {
}
function _provision_mysql_can_create_database() {
$test = 'site_test';
$test = drush_get_option('aegir_db_prefix', 'site_') .'test';
_provision_mysql_create_database($test);
if (_provision_mysql_database_exists($test)) {
if (!_provision_mysql_drop_database($test)) {
......@@ -216,7 +216,7 @@ password=%s
*/
function _provision_mysql_suggest_db_name($url) {
if ($sid = drush_get_option('site_id')) {
$suggest_base = 'site_'. $sid;
$suggest_base = drush_get_option('aegir_db_prefix', 'site_') . $sid;
}
elseif ($name = drush_get_option('db_name')) {
// consider the verified database name if no site id was provided
......
......@@ -53,3 +53,8 @@
* This url will be used to redirect sites that haven't been found or have been disabled.
*/
# $options['master_url'] = 'http://aegir.example.com';
/**
* The database prefix to use instead of the default 'site_'
*/
# $options['aegir_db_prefix'] = 'prefix_';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment