Open paul121 opened 4 years ago
Great ideas @paul121 !
One thought I've had is: "successions can be managed as a unit... until they can't". Meaning: at the beginning of the season you aim to have a really consistent and standardized set of successions, but reality inevitably messes it all up during the season.
So perhaps the ideal solution would be to allow you to "create a succession", which is essentially just a set of linked plantings, but also provide an option to split individual plantings out of the succession to be managed independently moving forward.
Although, to be honest, I have a feeling that will be more the rule than the exception, so maybe it doesn't even make sense to keep them linked after creation. eg: maybe the "succession form" is JUST a tool for creating individual plantings, but doesn't link them together after that. Just thinking: how often will plantings need to be "unlinked" from the succession. I have a feeling pretty often. So are we making it MORE work by forcing users to go through the additional step of "unlinking"? Or does keeping them linked provide enough value to outweigh that? This might be something we want to get more community feedback on before making any big decisions.
Assuming we do keep them linked, I think your second proposed database architecture makes sense (not entities). Summarized/simplified here (only including MVP data, I think):
{farm_crop_plan_succession}
succession_id
plan_id
crop_id
{farm_crop_plan_succession_planting}
succession_id
planting_id
The first table defines each succession as a unique record, and the second table serves to link successions to plantings in the plan.
So then, "unlinking" would simply delete the record from {farm_crop_plan_succession_planting}
, and the UI would then know to simply display the planting independently.
Draft of ideas for crop plan successions
In general, a succession would be a way to manage plantings that are all of the same crop and follow a similar "timeline" (same days to transplant, days to harvest, etc.) This would make it easier to create plantings every X days, following the structure of the crop plan. This group of plantings could then be managed as one unit, separate of other plantings in a single crop plan, while still allowing access to manage individual plantings.
Data Structure
succession
entity (maybe an asset?) ? Thinking about linkingcrops
,areas
, etc... seems like it might be easier to do this by creating an entity, and allow for more options in the future?OR
farm_crop_plan_succession
table):farm_crop_plan_succession_plantings
(is this table needed? or just asuccession_id
added tofarm_crop_plan_plantings
?)planting_id
succession_id
Rough user flows + form design
"Create a succession" form:
"Update succession":
"Delete a succession"