Add config dependencies on migrations

Created on 2 June 2023, almost 2 years ago
Updated 14 November 2023, over 1 year ago

Problem/Motivation

I had a client uninstalling gathercontent using configuration sync. So the configuration changes looked something like this:

+------------+------------------------------------------------------------------+-----------+
| Collection | Config                                                           | Operation |
+------------+------------------------------------------------------------------+-----------+
|            | core.extension                                                   | Update    |
|            | gathercontent.gathercontent_mapping.1717197                      | Delete    |
|            | gathercontent.gathercontent_mapping.1730545                      | Delete    |
|            | migrate_plus.migration.217408_1730545_paragraph_text_en          | Delete    |
|            | migrate_plus.migration.217408_1730545_paragraph_page_intro_en    | Delete    |
|            | migrate_plus.migration.217408_1730545_node_program_en            | Delete    |
|            | migrate_plus.migration.215944_1717197_paragraph_text_en          | Delete    |
|            | migrate_plus.migration.215944_1717197_paragraph_page_intro_en    | Delete    |
|            | migrate_plus.migration.215944_1717197_node_program_en            | Delete    |
|            | key.config_override.gather_content_settings                      | Delete    |
|            | key.key.gather_content_api_key                                   | Delete    |
|            | gathercontent.settings                                           | Delete    |
|            | gathercontent.import                                             | Delete    |
+------------+------------------------------------------------------------------+-----------+

Everytime we would try, the migration configuration files seemed to get deleted prior to the gathercontent mappings which relied on them.

Steps to reproduce

Create new a new mapping
create a database backup
uninstall the module
export the configuration
reload the database
run configuration import.

Proposed resolution

- ignore trying to delete migrations that come back as null.
- Add configuration dependencies to the mapping configs against the migrations.

πŸ› Bug report
Status

Needs work

Version

6.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States generalredneck Texas, USA πŸ‡ΊπŸ‡Έ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024