I'm trying to install Drupal and CiviCRM in a local development environment and I keep running into this issue:
[Exception] CiviCRM appears to have already been installed. Skipping full installation.
If I remove the civicrm
database and civicrm.settings.php
I can install Drupal and CiviCRM.
This is my current script:
mv web/sites/default/civicrm.settings.php web/sites/default/civicrm.settings.php.bkp
mysql -uroot -proot -hdb -e "DROP DATABASE IF EXISTS civicrm; CREATE DATABASE civicrm; GRANT ALL ON civicrm.* TO 'db'@'%';"
drush site:install minimal --existing-config --account-name=admin --account-pass=password --yes
drush pmu gvote_sync
mv web/sites/default/civicrm.settings.php.bkp web/sites/default/civicrm.settings.php
I understand requiring a clean database, but it seems like there's a use case for installing CiviCRM with an existing settings file. Is there a different way I should be doing this?
For context we have a large amount of Drupal Config saved in config/sync
that we would like to import. As well as a bunch of CiviCRM config defined in code.