installcore command - Support for db_prefix

carlos8f - October 30, 2009 - 21:13
Project:Drush
Version:All-Versions-HEAD
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I've been playing around with the new installcore command and noticed there was no support for database prefixes -- so here's a patch for it. It allows the prefix to be passed with the db-prefix option during the initial install, or through an existing settings.php for re-installs or if an array-based prefix is needed.

I'm very excited by the possibilities of installcore and looking forward to painless fully-automated Drupal deployment! :D

Cheers,
Carlos

AttachmentSize
db_prefix.patch2.19 KB

#1

carlos8f - October 30, 2009 - 21:15
Component:Installation» Code

#2

moshe weitzman - October 30, 2009 - 21:56
Status:needs review» fixed

Committed. I added a tiny refactor as well. Thanks.

I'm a bit unhappy about the name installcore. This command will execute any install profile, and those profiles can include core, contrib, and custom modules. Perhaps 'installsite', 'install' or 'installprofile'? Opinions?

#3

carlos8f - October 31, 2009 - 02:29

Thanks for getting to that so quick!

I agree that the command is a little misleading. I thought about it for a while and, while I like the simplicity of "install", it brought up this little problem:

drush install - could mirror install.php
drush update - mirrors update.php, except it does more (downloads modules)
drush updatedb - actually mirrors update.php
drush uninstall - sounds like a sibling for install, but if not if "installcore" is renamed to install.

Also, when browsing the code I came accross this:

commands/pm/pm.drush.inc:91

<?php
 
// Install command is reserved for the download and enable of projects including dependencies.
  // @see <a href="http://drupal.org/node/112692" title="http://drupal.org/node/112692" rel="nofollow">http://drupal.org/node/112692</a> for more information.
  // $items['install'] = array(
  //     'description' => 'Download and enable one or more modules',
  //   );
?>

Then looking at "installcore" and "installsite", there isn't any precedent for including either "core" or "site" in a command... but i'm probably leaning towards "installsite" since it implies more than just core installation.

Overall, it seems that there is a lack of consistency or convention in the command names (took me a while to get the hang of it at first). But hey, php itself has lots of those issues too :)

Perhaps we need a follow-up issue for refactoring the command names for drush 3.0.

#4

System Message - November 14, 2009 - 02:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.