SelectoMix.ConfigMerger (selecto_mix v0.4.2)
Merges new schema introspection data with existing user customizations.
This module intelligently combines freshly introspected schema data with existing domain configurations, preserving user customizations while incorporating new fields, associations, and other schema changes.
The merger uses special markers in the generated files to identify sections that can be safely regenerated vs. sections that contain user customizations.
Summary
Functions
Generate a backup of the existing file before major changes.
Merge two configuration maps intelligently.
Merge new domain configuration with existing file content.
Parse an existing domain file to extract configuration and customizations.
Functions
Generate a backup of the existing file before major changes.
Merge two configuration maps intelligently.
Merge new domain configuration with existing file content.
This function parses existing domain files to extract user customizations, then intelligently merges them with new schema data.
Strategy
- Parse existing file to identify custom vs. generated sections
- Extract user customizations (custom fields, filters, joins)
- Merge new schema fields while preserving customizations
- Generate backup of existing file if major changes detected
Returns
A merged configuration map that combines:
- All new/changed fields from schema introspection
- Preserved user customizations from existing file
- Updated metadata and suggestions
Parse an existing domain file to extract configuration and customizations.