1

I am trying to make a script that will create and configure a new multisite in a drupal 7 install using drush 5.8.

I have scripted creating the site folder and settings.php file manually and adding the database information (to get around a bug i was having with --db-url and sql server).

I am setting the dbprefix to be $newSite so that all the tables can live in the same database. The first thing drush site-install tries to do is drop ALL the tables in the database. This includes all the tables created with a different prefix in a previous install.

Is there any way to stop this from happening?

Thanks for your help in advance!

Joe

4

this is how I do mine...

drush -y site-install standard --db-url=mysql://$username:$pass@127.0.0.1:3306/$dbname --site-name="$sitename" --sites-subdir="$sitename"

sitename for instance could be test.drupalserver.com and to keep it in good practice for dbs i strip out the periods and the $dbname would be test_drupalserver_com.

I believe the way my drush command works, it creates a new db that matches the name of the site.

  • You have not included in your options the prefix options. That was important in the question. Also, you do not offer anything regarding the DROP all issue. – Guillaume Bois Mar 20 '15 at 19:31
1

FYI I am attempting to get this fix into the main Drush branch by adding the switch "db-drop-existing-tables" to the site-install method.

Here is the issue for you to follow: https://github.com/drush-ops/drush/issues/134

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.