Every now and then, if I try to import partial configs using drush, like

drush config:import --partial --source=stuff/is/here

drush seems to understand that some of these config entities exist in the database, and it needs to update them.

| Collection | Config                                                        | Operation |
|            | migrate_plus.migration_group.foo_migrate                      | Create    |
|            | migrate_plus.migration.upgrade_d7_node_complete_article       | Update    |
|            | migrate_plus.migration.upgrade_d7_taxonomy_term_article_types | Update    |

I was assuming because it noticed the uuid in the files matches those in the database. But if I try exactly the same command the second time, it will only say 'Create', and when I execute it, it throws an error saying they already exist.

The behaviour actually seems the same if I remove the uuid from the yml files.

I like to be able to edit, update, edit, update, without having to manually remove these entities (or reverting the database). Is that possible ? How ?

  • config:import --partial cannot delete, therefore you will have to manually remove
    – john Smith
    Jun 20 at 8:34
  • thanks. but apparently, it can update ? that would be good enough. how does it known when to update ?
    – commonpike
    Jun 20 at 8:46
  • 1
    yes, you can actually lookup what it does Drush ConfigImportCommands and you see it uses Drupal\Core\Config\StorageComparer where you find stuff like The entity has the same file as an existing entity but the UUIDs do not match. This means that the entity has been recreated so config synchronization should do the same.
    – john Smith
    Jun 20 at 9:18


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.