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

CommentFileSizeAuthor
db_prefix.patch2.19 KBcarlos8f

Comments

carlos8f’s picture

Component: Installation » Code
moshe weitzman’s picture

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?

carlos8f’s picture

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

  // Install command is reserved for the download and enable of projects including dependencies. 
  // @see http://drupal.org/node/112692 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.

Status: Fixed » Closed (fixed)

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