Columns
Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | int8 | 19 | null |
|
|
|||||||||||||||||||||
planting_site_id | int8 | 19 | null |
|
|
|||||||||||||||||||||
created_time | timestamptz | 35,6 | null |
|
|
|||||||||||||||||||||
start_date | date | 13 | null |
|
|
First day of the observation. This is either the first day of the month following the end of the planting season, or 6 months after that day. |
||||||||||||||||||||
end_date | date | 13 | null |
|
|
Last day of the observation. This is typically the last day of the same month as |
||||||||||||||||||||
completed_time | timestamptz | 35,6 | √ | null |
|
|
Server-generated date and time the final piece of data for the observation was received. |
|||||||||||||||||||
state_id | int4 | 10 | null |
|
|
|||||||||||||||||||||
upcoming_notification_sent_time | timestamptz | 35,6 | √ | null |
|
|
When the notification that the observation is starting in 1 month was sent. Null if the notification has not been sent yet. |
Indexes
Constraint Name | Type | Sort | Column(s) |
---|---|---|---|
observations_pkey | Primary key | Asc | id |
observations_planting_site_id_idx | Performance | Asc | planting_site_id |
Check Constraints
Constraint Name | Constraint |
---|---|
end_after_start | ((start_date <= end_date)) |
completed_time_and_state | ((((completed_time IS NULL) AND (state_id <> ALL (ARRAY[3, 5]))) OR ((completed_time IS NOT NULL) AND (state_id = ANY (ARRAY[3, 5]))))) |