Open micah-prime opened 2 weeks ago
erDiagram
Campaign ||--|{ Site : "has many"
Site ||--|| SiteCondition : "has one"
Campaign
Site {
int campaign_id
int site_condition_id
String plot_id
date site_visit
}
SiteCondition {
int site_id
}
I imagine all of these pit header fields going into the Site
table
I imagine all of these pit header fields going into the
Site
table
Yep, basically everything here https://github.com/SnowEx/snowexsql/blob/master/snowexsql/tables/site_data.py#L15-L28
We now have a
Site
belonging to aCampaign
. PreviouslySiteData
had a date AND location associated with weather, conditions, etc.To maintain this info, we can change
SiteData
toSiteConditions
and link that to theSite
.https://github.com/SnowEx/snowexsql/blob/dev/snowexsql/tables/site_data.py#L11 https://github.com/SnowEx/snowexsql/blob/dev/snowexsql/tables/site.py#L20
Site
can have the location andSiteConditions
can have date-specific conditions. Each point or pit can link to aSiteCondition
, belonging to aSite
, belonging to aCampaign
.FYI @micahjohnson150