zerobyte
zerobyte copied to clipboard
Data model: Duplicate fields stored in both dedicated field and config field
Some entity fields are stored both in dedicated fields and inside the config field.
This happens because the frontend sends the entire form values object as config, which includes fields already stored separately.
Options:
- Strip duplicate fields before storing in
config(backend) - Exclude duplicates when building form payload (frontend)
- Keep as-is (redundancy is harmless, just wasteful and confusing)
Low priority - doesn't affect functionality.
| Entity | Dedicated Field | Also in config | Note |
|---|---|---|---|
| Volumes | name | config.name | seems its not needed under config |
| Volumes | type | config.backend | needed under config, good for querying as separate field |
| Repositories (local) | name | config.name | Service explicitly and luckily overwrites config.name = shortId for local. Here its actually important. |
| Repositories (other) | name | config.name | seems its not needed under config |
| Repositories | type | config.backend | needed under config, good for querying as separate field |
| Repositories | compressionMode | config.compressionMode | seems its not needed under config |
| Notifications | type | config.type | needed under config, good for querying as separate field |