NO TICKET: revert value_reason to groundwater_level_reason#177
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
|
|
Why do different observation types need separate fields? Are all the fields going to be string fields? It should be clear from the observation type what the reason represents. This seems like a case of the storage layer driving design which is something we should avoid. |
|
I think the reason that this was split into separate fields depending on the observation type is because different types of observations can have different numbers of "reason" fields (water chemistry will likely need more than one - perhaps one for the field and one (or more) for the lab). This will also allow us to more easily restrict possible reasons by observation type. The following reason, for example, doesn't really apply to non-groundwater level observations: We could create a separate "reason" table to allow multiple reasons to be associated with a particular observation, negating the necessity of multiple fields in the observation table. That's a bit more up-front work (and another table), but then the reasons will all be standardized and normalized. |
|
@jacob-a-brown @jirhiker Yes, Jacob is correct, we did discuss a separate |
|
That sounds correct to me. We can just have this going for water levels for the time being, then when water chemistry is incorporated we can refactor. Or would it make more sense to refactor now to prevent undoing/redoing work later on? |
|
That all makes sense, thanks. |
Why
This PR addresses the following problem / context:
How
Implementation summary - the following was changed / added / removed:
value_reasonas a non-nullable field for all observationsgroundwater_level_reasonfor groundwater level observations as a nullable fieldNotes
Any special considerations, workarounds, or follow-up work to note?
Water level not affected by statustoWater level not affected