Columns
Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | int8 | 19 | null |
|
|
|||||||||||||||||||||||||||||||
planting_subzone_id | int8 | 19 | √ | null |
|
|
Which planting subzone this monitoring plot is currently part of, if any. May be null if the subzone was edited or removed after the plot was created, or if the plot was created outside the site boundary. |
|||||||||||||||||||||||||||||
created_by | int8 | 19 | null |
|
|
Which user created the monitoring plot. |
||||||||||||||||||||||||||||||
created_time | timestamptz | 35,6 | null |
|
|
When the monitoring plot was originally created. |
||||||||||||||||||||||||||||||
modified_by | int8 | 19 | null |
|
|
Which user most recently modified the monitoring plot. |
||||||||||||||||||||||||||||||
modified_time | timestamptz | 35,6 | null |
|
|
When the monitoring plot was most recently modified. |
||||||||||||||||||||||||||||||
boundary | geometry | 2147483647 | null |
|
|
Boundary of the monitoring plot. Coordinates always use SRID 4326 (WGS 84 latitude/longitude). |
||||||||||||||||||||||||||||||
permanent_cluster | int4 | 10 | √ | null |
|
|
If this plot is a candidate to be a permanent monitoring plot, its position in the randomized list of plots for the planting zone. Starts at 1 for each planting zone. There are always 4 plots with a given sequence number in a given zone. If null, this plot is not part of a 4-plot cluster but may still be chosen as a temporary monitoring plot. |
|||||||||||||||||||||||||||||
permanent_cluster_subplot | int4 | 10 | √ | null |
|
|
If this plot is a candidate to be a permanent monitoring plot, its ordinal position from 1 to 4 in the 4-plot cluster. 1=southwest, 2=southeast, 3=northeast, 4=northwest. |
|||||||||||||||||||||||||||||
is_available | bool | 1 | true |
|
|
|||||||||||||||||||||||||||||||
size_meters | int4 | 10 | null |
|
|
Length in meters of one side of the monitoring plot. Plots are always squares, so for a 30x30m plot, this would be 30. |
||||||||||||||||||||||||||||||
planting_site_id | int8 | 19 | null |
|
|
|||||||||||||||||||||||||||||||
is_ad_hoc | bool | 1 | null |
|
|
|||||||||||||||||||||||||||||||
organization_id | int8 | 19 | null |
|
|
|||||||||||||||||||||||||||||||
plot_number | int8 | 19 | null |
|
|
User-visible identifier of this plot. Plot numbers are sequential and start at 1 for each organization. |
Indexes
Constraint Name | Type | Sort | Column(s) |
---|---|---|---|
monitoring_plots_pkey | Primary key | Asc | id |
monitoring_plots_organization_id_plot_number_key | Must be unique | Asc/Asc | organization_id + plot_number |
monitoring_plots_planting_site_id_idx | Performance | Asc | planting_site_id |
Check Constraints
Constraint Name | Constraint |
---|---|
subplot_is_valid | (((permanent_cluster_subplot >= 1) AND (permanent_cluster_subplot <= 4))) |
cluster_has_subplot | ((((permanent_cluster IS NOT NULL) AND (permanent_cluster_subplot IS NOT NULL)) OR ((permanent_cluster IS NULL) AND (permanent_cluster_subplot IS NULL)))) |