Index: commands/core/core.drush.inc =================================================================== RCS file: /cvs/drupal/contributions/modules/drush/commands/core/core.drush.inc,v retrieving revision 1.49 diff -u -r1.49 core.drush.inc --- commands/core/core.drush.inc 30 Oct 2009 06:12:08 -0000 1.49 +++ commands/core/core.drush.inc 30 Oct 2009 21:02:11 -0000 @@ -149,6 +149,7 @@ ), 'options' => array( 'db-url' => 'A Drupal 5/6 style database URL. Only required for initial install - not re-install.', + 'db-prefix' => 'An optional table prefix to use for initial install.', 'account-user' => 'uid1 name. defaults to admin', 'account-pass' => 'uid1 pass. defaults to admin', 'account-mail' => 'uid1 email. defaults to admin@example.com', Index: commands/core/installcore.drush.inc =================================================================== RCS file: /cvs/drupal/contributions/modules/drush/commands/core/installcore.drush.inc,v retrieving revision 1.4 diff -u -r1.4 installcore.drush.inc --- commands/core/installcore.drush.inc 30 Oct 2009 19:21:15 -0000 1.4 +++ commands/core/installcore.drush.inc 30 Oct 2009 21:02:11 -0000 @@ -105,19 +105,23 @@ install_drupal($settings); } -// Return a db_spec based on supplied db_url or existing settings.php. +// Return a db_spec based on supplied db_url/db_prefix options or +// an existing settings.php. function drush_core_installcore_db_spec() { if ($db_url = drush_get_option('db-url')) { // We were passed a db_url. Usually a fresh site. - return drush_convert_db_from_db_url($db_url); + $db_spec = drush_convert_db_from_db_url($db_url); + $db_spec['db_prefix'] = drush_get_option('db-prefix'); } elseif (drush_bootstrap_max() >= DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION) { // We have an existing settings.php. drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION); - return _drush_sql_get_db_spec(); + $db_spec = _drush_sql_get_db_spec(); + $db_spec['db_prefix'] = $GLOBALS['db_prefix']; } else { drush_set_error(dt('Could note determine database details.')); return FALSE; } + return $db_spec; } \ No newline at end of file