Issues migrating site config at various points in project lifecycle
My team and I have begun a new project for our company using the very latest version of Drupal 8 (version 8.5.6)
We wanted to use config migration in order to carry config changes from one developer across to another seamlessly and across to staging and production environments.
We are in the middle of testing the migration workflow and have run into a problem.
I started off the project by doing a standard Drupal 8 installation. I then did a migrations export (
drupal ce), committed this to the repository.
My colleague proceeded to install Drupal also, also a standard install,
drush cr etc., and then pulled the latest changes and ran
drupal ci and ran into an error, namely:
[ERROR] An error occurred while trying to write the config file: "Entities exist of type <em class="placeholder">Shortcut link</em> and <em class="placeholder">Shortcut set</em> <em class="placeholder">Default</em>. These entities need to be deleted before importing."
Prior to this we had an additional issue where Drupal complained about mismatched UUID’s. We got around this by updating his UUID as follows:
[ERROR] An error occurred while trying to write the config file: "Site UUID in source storage does not match the target storage.
drush config-set "system.site" uuid "42e3c541-5ebc-4ec9-a8f0-e8c6ad1ccfb7
The above UUID was gained from my installation.
So now we are left with the first error explained above.
We tried deleting the shortcuts manually, as suggested in several places on the internet, but this caused his system to completely break.
I also thought possibly that instead of him doing a clean, standard install at the start of the work that he should have used a snapshot of my initial installation, and when we move the app to staging and/or development it will follow suit that we use backups for the initial setup to ensure the DB is in sync with regard to UUIDs, but I am not convinced this is the correct way to do it.
So, we are a little lost on exactly what is the recommended workflow for migrations, with the view that we will be using the workflow going into production also, e.g. after launch we will want to use config migration export/imports to apply changes made locally.