Change databse.enabled type from bool to string
Context
Change the database.enabled configuration field from bool to string to enable future support three values: "true", "false", and "prefer" as outlined in Epic &19638.
Implementation
Update the Database struct in configuration/configuration.go:
- Change
Enabled booltoEnabled string - Add validation to accept only
"true","false" - Maintain backward compatibility with existing boolean YAML values
- Add appropriate YAML unmarshaling logic
Success Criteria
-
database.enabledaccepts string values:"true","false", - Backward compatibility maintained for existing boolean configurations
- Configuration validation prevents invalid values
- Tests updated for new string type
The actual detection and fallback logic will be handled in separate issues. This one's just about making the configuration ready for that future work.
Splitting out the work in this way helps ensure that we're not going to break existing installs merely through alterting the configuration.
Edited by Hayley Swimelar