observations

0 rows


Description

Scheduled observations of planting sites. This table may contain rows describing future observations as well as current and past ones.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id int8 19 null
observation_photos.observation_id observation_photos_observation_id_fkeyR
observation_plot_conditions.observation_id observation_plot_conditions_observation_id_fkeyC
observation_plots.observation_id observation_plots_observation_id_fkeyC
observation_requested_subzones.observation_id observation_requested_subzones_observation_id_fkeyC
observed_plot_coordinates.observation_id observed_plot_coordinates_observation_id_fkeyC
observed_plot_species_totals.observation_id observed_plot_species_totals_observation_id_fkeyC
observed_site_species_totals.observation_id observed_site_species_totals_observation_id_fkeyC
observed_zone_species_totals.observation_id observed_zone_species_totals_observation_id_fkeyC
recorded_plants.observation_id recorded_plants_observation_id_fkeyC
planting_site_id int8 19 null
planting_sites.id observations_planting_site_id_fkeyC
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 start_date.

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
observation_states.id observations_state_id_fkeyR
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
completed_time_and_state ((((completed_time IS NULL) AND (state_id <> 3)) OR ((completed_time IS NOT NULL) AND (state_id = 3))))
end_after_start ((start_date <= end_date))

Relationships