Open ctorgalson opened 3 weeks ago
In fact, testing shows that this is only a problem if drush cim
runs before drush updb
(contrary to drush deploy
's order).
Nevertheless, it has happened, so the update hook should check before creating new fields and config.
@ekes I've confirmed with @tran-bigbluedoor that the PR above is working. Running this updated hook on a project where those fields are already in config no longer causes the import to fail. So all good from our side, thank you.
The update hook creates two new fields for the
localgov_paragraphs
module, but fails to check if they're already present.This means a workflow like that shown below will fail on the final step because
drush updb
creates the fields, so the subsequentdrush cim
step finds the fields and config already exist.