<?xml version="1.0" encoding="UTF-8"?><database name="terraware_045577cc_2c057118f580" schema="tracking" type="PostgreSQL - 17.11 (Debian 17.11-1.pgdg13+2)">
   <tables>
      <table name="biomass_forest_types" remarks="(Enum) Types for forest in a biomass observation." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="forest_type_id" foreignKey="observation_biomass_details_forest_type_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_details"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="biomass_forest_types_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="biomass_forest_types_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="deliveries" remarks="Incoming deliveries of new seedlings to a planting site. Mostly exists to link plantings and nursery withdrawals." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="reassigned_from_delivery_id" foreignKey="deliveries_reassigned_from_delivery_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="deliveries"/>
            <child column="delivery_id" foreignKey="plantings_planting_site_id_delivery_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="plantings"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="withdrawal_id" nullable="false" remarks="Which nursery withdrawal the plants came from." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="deliveries_withdrawal_id_fkey" implied="false" onDeleteCascade="true" schema="nursery" table="withdrawals"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="planting_site_id" nullable="false" remarks="Which planting site received the delivery." size="19" type="int8" typeCode="-5">
            <child column="planting_site_id" foreignKey="plantings_planting_site_id_delivery_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="plantings"/>
            <parent column="id" foreignKey="deliveries_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="created_by" nullable="false" remarks="Which user created the delivery." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="deliveries_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="4" name="created_time" nullable="false" remarks="When the delivery was created." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="modified_by" nullable="false" remarks="Which user most recently modified the delivery." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="deliveries_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="6" name="modified_time" nullable="false" remarks="When the delivery was most recently modified." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="reassigned_by" nullable="true" remarks="Which user recorded the reassignment of plants in this delivery. Null if this delivery has no reassignment." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="deliveries_reassigned_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="8" name="reassigned_time" nullable="true" remarks="When the reassignment was recorded. Null if this delivery has no reassignment." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="reassigned_from_delivery_id" nullable="true" remarks="If this delivery was created by reassigning plants from a delivery at another planting site, the ID of that delivery." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="deliveries_reassigned_from_delivery_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="deliveries"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="deliveries_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="deliveries_planting_site_id_id_key" unique="true">
            <column ascending="true" name="planting_site_id"/>
            <column ascending="true" name="id"/>
         </index>
         <index name="deliveries_reassigned_from_delivery_id_idx" unique="false">
            <column ascending="true" name="reassigned_from_delivery_id"/>
         </index>
         <index name="deliveries_withdrawal_id_planting_site_id_key" unique="true">
            <column ascending="true" name="withdrawal_id"/>
            <column ascending="true" name="planting_site_id"/>
         </index>
      </table>
      <table name="draft_planting_site_types" remarks="(Enum) Whether a draft planting site is a simple site with only a boundary or a detailed one with strata and substrata." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="site_type_id" foreignKey="draft_planting_sites_site_type_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="draft_planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="draft_planting_site_types_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="draft_planting_site_types_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="draft_planting_sites" remarks="Details of planting sites that are in the process of being defined." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="draft_planting_site_id" foreignKey="draft_strata_draft_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="draft_strata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="organization_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="draft_planting_sites_organization_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
            <parent column="organization_id" foreignKey="draft_planting_sites_organization_id_project_id_fkey" implied="false" onDeleteCascade="false" schema="public" table="projects"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="project_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="draft_planting_sites_project_id_fkey" implied="false" onDeleteCascade="false" schema="public" table="projects"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="description" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="time_zone" nullable="true" remarks="" size="2147483647" type="text" typeCode="12">
            <parent column="time_zone" foreignKey="draft_planting_sites_time_zone_fkey" implied="false" onDeleteCascade="false" schema="public" table="time_zones"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="created_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="draft_planting_sites_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="7" name="created_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="modified_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="draft_planting_sites_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="9" name="modified_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="site_type_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="draft_planting_sites_site_type_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="draft_planting_site_types"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="site_edit_step" nullable="true" remarks="Client-defined identifier of the step of the site creation process the user is on. Opaque to the server." size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="boundary_source" nullable="true" remarks="Client-defined indicator of how the boundary was created, e.g., drawn or uploaded. Opaque to the server." size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="boundary" nullable="true" remarks="Boundary of the planting site as defined so far. Null if the user has not drawn or uploaded a boundary yet." size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="exclusion" nullable="true" remarks="Areas inside the boundary that are excluded from the planting site." size="2147483647" type="geometry" typeCode="1111"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="draft_planting_sites_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="draft_planting_sites_organization_id_idx" unique="false">
            <column ascending="true" name="organization_id"/>
         </index>
         <index name="draft_planting_sites_project_id_idx" unique="false">
            <column ascending="true" name="project_id"/>
         </index>
      </table>
      <table name="draft_strata" remarks="Strata of draft planting sites. Only detailed drafts have strata." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="draft_stratum_id" foreignKey="draft_substrata_draft_stratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="draft_substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="draft_planting_site_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="draft_strata_draft_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="draft_planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="boundary" nullable="false" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="initial_planting_density" nullable="false" remarks="Planned planting density in plants per hectare." size="0" type="numeric" typeCode="2"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="draft_strata_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="draft_strata_draft_planting_site_id_name_key" unique="true">
            <column ascending="true" name="draft_planting_site_id"/>
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="draft_substrata" remarks="Substrata of the strata of draft planting sites." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="draft_stratum_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="draft_substrata_draft_stratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="draft_strata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="boundary" nullable="false" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="draft_substrata_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="draft_substrata_draft_stratum_id_name_key" unique="true">
            <column ascending="true" name="draft_stratum_id"/>
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="mangrove_tides" remarks="(Enum) High/Low tide at a mangrove during an observation." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="tide_id" foreignKey="observation_biomass_details_tide_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_details"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="mangrove_tides_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="mangrove_tides_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="monitoring_plot_histories" remarks="Versions of monitoring plots over time. Each time a planting site changes, its monitoring plots are added to this table." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="monitoring_plot_history_id" foreignKey="observation_plot_results_monitoring_plot_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plot_results"/>
            <child column="monitoring_plot_history_id" foreignKey="observation_plots_monitoring_plot_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plots"/>
            <child column="monitoring_plot_history_id" foreignKey="observed_plot_species_totals_monitoring_plot_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_plot_species_totals"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="monitoring_plot_histories_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="substratum_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="monitoring_plot_histories_substratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="planting_site_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="monitoring_plot_histories_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="substratum_history_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="monitoring_plot_histories_substratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substratum_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="planting_site_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="monitoring_plot_histories_planting_site_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_site_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="created_by" nullable="false" remarks="Which user created or edited the monitoring plot or its planting site." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="monitoring_plot_histories_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="7" name="created_time" nullable="false" remarks="When the monitoring plot was created, edited, or associated with a new planting site history record. May differ from the time when the substratum or planting site was created or edited since plots can be created when observations start." size="35" type="timestamptz" typeCode="93"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="monitoring_plot_histories_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="monitoring_plot_histories_created_by_idx" unique="false">
            <column ascending="true" name="created_by"/>
         </index>
         <index name="monitoring_plot_histories_monitoring_plot_id_idx" unique="false">
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
         <index name="monitoring_plot_histories_planting_site_history_id_idx" unique="false">
            <column ascending="true" name="planting_site_history_id"/>
         </index>
         <index name="monitoring_plot_histories_planting_site_id_idx" unique="false">
            <column ascending="true" name="planting_site_id"/>
         </index>
         <index name="monitoring_plot_histories_substratum_history_id_idx" unique="false">
            <column ascending="true" name="substratum_history_id"/>
         </index>
         <index name="monitoring_plot_histories_substratum_id_idx" unique="false">
            <column ascending="true" name="substratum_id"/>
         </index>
      </table>
      <table name="monitoring_plot_overlaps" remarks="Which monitoring plots overlap with previously-used monitoring plots. A plot may overlap with multiple older or newer plots." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="monitoring_plot_id" nullable="false" remarks="ID of the newer monitoring plot." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="monitoring_plot_overlaps_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="overlaps_plot_id" nullable="false" remarks="ID of the older monitoring plot." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="monitoring_plot_overlaps_overlaps_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
         </column>
         <primaryKey column="monitoring_plot_id" sequenceNumberInPK="1"/>
         <primaryKey column="overlaps_plot_id" sequenceNumberInPK="2"/>
         <index name="monitoring_plot_overlaps_pkey" unique="true">
            <column ascending="true" name="monitoring_plot_id"/>
            <column ascending="true" name="overlaps_plot_id"/>
         </index>
         <index name="monitoring_plot_overlaps_overlaps_plot_id_idx" unique="false">
            <column ascending="true" name="overlaps_plot_id"/>
         </index>
         <checkConstraint constraint="(overlaps_plot_id &lt; monitoring_plot_id)" name="newer_overlaps_older"/>
      </table>
      <table name="monitoring_plots" remarks="Regions within substrata that can be comprehensively surveyed in order to extrapolate results for the entire stratum. Any monitoring plot in a substratum is expected to have roughly the same number of plants of the same species as any other monitoring plot in the same substratum." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="monitoring_plot_id" foreignKey="published_activity_observation_media_fi_monitoring_plot_id_fkey" implied="false" onDeleteCascade="false" schema="funder" table="published_activity_observation_media_files"/>
            <child column="monitoring_plot_id" foreignKey="monitoring_plot_histories_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plot_histories"/>
            <child column="monitoring_plot_id" foreignKey="monitoring_plot_overlaps_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plot_overlaps"/>
            <child column="overlaps_plot_id" foreignKey="monitoring_plot_overlaps_overlaps_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plot_overlaps"/>
            <child column="monitoring_plot_id" foreignKey="observation_biomass_additional_species_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_additional_species"/>
            <child column="monitoring_plot_id" foreignKey="observation_biomass_details_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_details"/>
            <child column="monitoring_plot_id" foreignKey="observation_biomass_quadrat_details_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_quadrat_details"/>
            <child column="monitoring_plot_id" foreignKey="observation_biomass_quadrat_species_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_quadrat_species"/>
            <child column="monitoring_plot_id" foreignKey="observation_photos_monitoring_plot_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_media_files"/>
            <child column="monitoring_plot_id" foreignKey="observation_plot_conditions_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plot_conditions"/>
            <child column="monitoring_plot_id" foreignKey="observation_plot_results_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plot_results"/>
            <child column="monitoring_plot_id" foreignKey="observation_plots_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plots"/>
            <child column="monitoring_plot_id" foreignKey="observed_plot_coordinates_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_plot_coordinates"/>
            <child column="monitoring_plot_id" foreignKey="observed_plot_species_totals_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_plot_species_totals"/>
            <child column="monitoring_plot_id" foreignKey="plot_t0_densities_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="plot_t0_densities"/>
            <child column="monitoring_plot_id" foreignKey="plot_t0_observations_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="plot_t0_observations"/>
            <child column="monitoring_plot_id" foreignKey="recorded_plants_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="recorded_plants"/>
            <child column="monitoring_plot_id" foreignKey="recorded_trees_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="recorded_trees"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="substratum_id" nullable="true" remarks="Which substratum this monitoring plot is currently part of, if any. Ad-hoc plots are part of the substratum they overlap the most. May be null if the substratum was edited or removed after the plot was created, or if the plot is outside every substratum." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="monitoring_plots_substratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="created_by" nullable="false" remarks="Which user created the monitoring plot." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="monitoring_plots_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="3" name="created_time" nullable="false" remarks="When the monitoring plot was originally created." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="modified_by" nullable="false" remarks="Which user most recently modified the monitoring plot." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="monitoring_plots_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="5" name="modified_time" nullable="false" remarks="When the monitoring plot was most recently modified." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="boundary" nullable="false" remarks="Boundary of the monitoring plot. Coordinates always use SRID 4326 (WGS 84 latitude/longitude)." size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="permanent_index" nullable="true" remarks="If this plot is a candidate to be a permanent monitoring plot, its position in the randomized list of plots for the stratum. Starts at 1 for each stratum. If null, this plot is not currently a candidate for selection as a permanent plot but may still be chosen as a temporary plot." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="true" digits="0" id="8" name="is_available" nullable="false" remarks="" size="1" type="bool" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="size_meters" nullable="false" remarks="Length in meters of one side of the monitoring plot. Plots are always squares, so for a 30x30m plot, this would be 30." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="planting_site_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="monitoring_plots_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="is_ad_hoc" nullable="false" remarks="" size="1" type="bool" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="organization_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="monitoring_plots_organization_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="plot_number" nullable="false" remarks="User-visible identifier of this plot. Plot numbers are sequential and start at 1 for each organization." size="19" type="int8" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="elevation_meters" nullable="true" remarks="" size="0" type="numeric" typeCode="2"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="monitoring_plots_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="monitoring_plots_organization_id_plot_number_key" unique="true">
            <column ascending="true" name="organization_id"/>
            <column ascending="true" name="plot_number"/>
         </index>
         <index name="monitoring_plots_planting_site_id_idx" unique="false">
            <column ascending="true" name="planting_site_id"/>
         </index>
         <index name="monitoring_plots_substratum_id_idx" unique="false">
            <column ascending="true" name="substratum_id"/>
         </index>
      </table>
      <table name="observable_conditions" remarks="(Enum) Conditions that can be observed in a monitoring plot." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="condition_id" foreignKey="observation_plot_conditions_condition_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_plot_conditions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="observable_conditions_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="observable_conditions_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="observation_biomass_additional_species" remarks="Species that were seen in a monitoring plot during a biomass observation but that have no recorded trees or quadrat measurements in the plot." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="observation_id" foreignKey="observation_biomass_additiona_observation_id_monitoring_pl_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_details"/>
            <parent column="observation_id" foreignKey="observation_biomass_additiona_observation_id_biomass_speci_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_species"/>
            <parent column="id" foreignKey="observation_biomass_additional_species_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_biomass_additional_species_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
            <parent column="monitoring_plot_id" foreignKey="observation_biomass_additiona_observation_id_monitoring_pl_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_details"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="biomass_species_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_biomass_additional_species_biomass_species_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_species"/>
         </column>
         <primaryKey column="observation_id" sequenceNumberInPK="1"/>
         <primaryKey column="monitoring_plot_id" sequenceNumberInPK="2"/>
         <primaryKey column="biomass_species_id" sequenceNumberInPK="3"/>
         <index name="observation_biomass_additional_species_pkey" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_id"/>
            <column ascending="true" name="biomass_species_id"/>
         </index>
         <index name="observation_biomass_additional_species_biomass_species_id_idx" unique="false">
            <column ascending="true" name="biomass_species_id"/>
         </index>
         <index name="observation_biomass_additional_species_monitoring_plot_id_idx" unique="false">
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
      </table>
      <table name="observation_biomass_details" remarks="Recorded data for a biomass observation." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="observation_id" foreignKey="observation_biomass_additiona_observation_id_monitoring_pl_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_additional_species"/>
            <child column="observation_id" foreignKey="observation_biomass_quadrat_d_observation_id_monitoring_pl_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_quadrat_details"/>
            <parent column="observation_id" foreignKey="observation_biomass_details_observation_id_monitoring_plot_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_plots"/>
            <parent column="id" foreignKey="observation_biomass_details_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="monitoring_plot_id" foreignKey="observation_biomass_additiona_observation_id_monitoring_pl_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_additional_species"/>
            <child column="monitoring_plot_id" foreignKey="observation_biomass_quadrat_d_observation_id_monitoring_pl_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_quadrat_details"/>
            <parent column="id" foreignKey="observation_biomass_details_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
            <parent column="monitoring_plot_id" foreignKey="observation_biomass_details_observation_id_monitoring_plot_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_plots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="description" nullable="true" remarks="" size="50" type="varchar" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="forest_type_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observation_biomass_details_forest_type_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="biomass_forest_types"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="small_trees_count_low" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="small_trees_count_high" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="herbaceous_cover_percent" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="soil_assessment" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="water_depth_cm" nullable="true" remarks="Depth of water in centimeters (cm). Only allowed if forest type is &quot;Mangrove&quot;. Null value indicates no water in monitoring plot." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="salinity_ppt" nullable="true" remarks="Salinity of water in parts per thousand (ppt). Only allowed if forest type is &quot;Mangrove&quot;. Null value indicates no water in monitoring plot." size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="ph" nullable="true" remarks="Acidity of water in pH. Only allowed if forest type is &quot;Mangrove&quot;. Null value indicates no water in monitoring plot." size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="tide_id" nullable="true" remarks="High/low tide during observation. Only allowed if forest type is &quot;Mangrove&quot;. Null value indicates no water in monitoring plot." size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observation_biomass_details_tide_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="mangrove_tides"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="12" name="tide_time" nullable="true" remarks="Time when the tide is recorded. Only allowed if forest type is &quot;Mangrove&quot;. Null value indicates no water in monitoring plot." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="soil_type_id" nullable="true" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observation_biomass_details_soil_type_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="soil_types"/>
         </column>
         <column autoUpdated="false" defaultValue="1" digits="0" id="14" name="next_tree_number" nullable="false" remarks="Number to assign to the next tree recorded in this observation plot. Never decreases, so numbers of deleted trees are not reused." size="10" type="int4" typeCode="4"/>
         <primaryKey column="observation_id" sequenceNumberInPK="1"/>
         <primaryKey column="monitoring_plot_id" sequenceNumberInPK="2"/>
         <index name="observation_biomass_details_pkey" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
         <index name="observation_biomass_details_monitoring_plot_id_idx" unique="false">
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
         <checkConstraint constraint="(((water_depth_cm IS NULL) AND (salinity_ppt IS NULL) AND (ph IS NULL) AND (tide_id IS NULL) AND (tide_time IS NULL)) OR ((forest_type_id = 2) AND (water_depth_cm IS NOT NULL) AND (salinity_ppt IS NOT NULL) AND (ph IS NOT NULL) AND (tide_id IS NOT NULL) AND (tide_time IS NOT NULL)))" name="mangrove_required_values"/>
         <checkConstraint constraint="(small_trees_count_low &lt;= small_trees_count_high)" name="observation_biomass_details_check"/>
         <checkConstraint constraint="(((herbaceous_cover_percent)::numeric &gt;= (0)::numeric) AND ((herbaceous_cover_percent)::numeric &lt;= (100)::numeric))" name="observation_biomass_details_herbaceous_cover_percent_check"/>
         <checkConstraint constraint="((ph &gt;= (0)::numeric) AND (ph &lt;= (14)::numeric))" name="observation_biomass_details_ph_check"/>
         <checkConstraint constraint="(salinity_ppt &gt;= (0)::numeric)" name="observation_biomass_details_salinity_ppt_check"/>
         <checkConstraint constraint="(small_trees_count_low &gt;= 0)" name="observation_biomass_details_small_trees_count_low_check"/>
         <checkConstraint constraint="((water_depth_cm)::numeric &gt;= (0)::numeric)" name="observation_biomass_details_water_depth_cm_check"/>
      </table>
      <table name="observation_biomass_quadrat_details" remarks="Details of a biomass observation at each quadrat of a monitoring plot." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="observation_id" foreignKey="quadrat_species_requires_quadrat_details" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_quadrat_species"/>
            <parent column="observation_id" foreignKey="observation_biomass_quadrat_d_observation_id_monitoring_pl_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_details"/>
            <parent column="id" foreignKey="observation_biomass_quadrat_details_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="monitoring_plot_id" foreignKey="quadrat_species_requires_quadrat_details" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_quadrat_species"/>
            <parent column="id" foreignKey="observation_biomass_quadrat_details_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
            <parent column="monitoring_plot_id" foreignKey="observation_biomass_quadrat_d_observation_id_monitoring_pl_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_details"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="position_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="position_id" foreignKey="quadrat_species_requires_quadrat_details" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_quadrat_species"/>
            <parent column="id" foreignKey="observation_biomass_quadrat_details_position_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_plot_positions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="observation_id" sequenceNumberInPK="1"/>
         <primaryKey column="monitoring_plot_id" sequenceNumberInPK="2"/>
         <primaryKey column="position_id" sequenceNumberInPK="3"/>
         <index name="observation_biomass_quadrat_details_pkey" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_id"/>
            <column ascending="true" name="position_id"/>
         </index>
         <index name="observation_biomass_quadrat_details_monitoring_plot_id_idx" unique="false">
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
      </table>
      <table name="observation_biomass_quadrat_species" remarks="Herbaceous species at each quadrat of a monitoring plot of a biomass observation" schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="observation_id" foreignKey="quadrat_species_requires_quadrat_details" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_quadrat_details"/>
            <parent column="observation_id" foreignKey="observation_biomass_quadrat_s_observation_id_biomass_speci_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_species"/>
            <parent column="id" foreignKey="observation_biomass_quadrat_species_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_biomass_quadrat_species_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
            <parent column="monitoring_plot_id" foreignKey="quadrat_species_requires_quadrat_details" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_quadrat_details"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="position_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observation_biomass_quadrat_species_position_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_plot_positions"/>
            <parent column="position_id" foreignKey="quadrat_species_requires_quadrat_details" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_quadrat_details"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="biomass_species_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_biomass_quadrat_species_biomass_species_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="abundance_count" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <primaryKey column="observation_id" sequenceNumberInPK="1"/>
         <primaryKey column="monitoring_plot_id" sequenceNumberInPK="2"/>
         <primaryKey column="position_id" sequenceNumberInPK="3"/>
         <primaryKey column="biomass_species_id" sequenceNumberInPK="4"/>
         <index name="observation_biomass_quadrat_species_pkey" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_id"/>
            <column ascending="true" name="position_id"/>
            <column ascending="true" name="biomass_species_id"/>
         </index>
         <index name="observation_biomass_quadrat_species_monitoring_plot_id_idx" unique="false">
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
         <checkConstraint constraint="((abundance_count &gt;= 0) AND (abundance_count &lt;= 25))" name="abundance_count_check"/>
      </table>
      <table name="observation_biomass_species" remarks="Herbaceous and tree species data for a biomass observation. Shared by all the monitoring plots in the observation." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="biomass_species_id" foreignKey="observation_biomass_additional_species_biomass_species_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_additional_species"/>
            <child column="biomass_species_id" foreignKey="observation_biomass_quadrat_species_biomass_species_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_quadrat_species"/>
            <child column="biomass_species_id" foreignKey="observed_plot_species_totals_biomass_species_id_observatio_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_plot_species_totals"/>
            <child column="biomass_species_id" foreignKey="observed_site_species_totals_biomass_species_id_observatio_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_site_species_totals"/>
            <child column="biomass_species_id" foreignKey="observed_stratum_species_tota_biomass_species_id_observati_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_stratum_species_totals"/>
            <child column="biomass_species_id" foreignKey="observed_substratum_species_t_biomass_species_id_observati_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_substratum_species_totals"/>
            <child column="biomass_species_id" foreignKey="recorded_trees_observation_id_biomass_species_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="recorded_trees"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="observation_id" foreignKey="observation_biomass_additiona_observation_id_biomass_speci_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_additional_species"/>
            <child column="observation_id" foreignKey="observation_biomass_quadrat_s_observation_id_biomass_speci_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_quadrat_species"/>
            <child column="observation_id" foreignKey="observed_plot_species_totals_biomass_species_id_observatio_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_plot_species_totals"/>
            <child column="observation_id" foreignKey="observed_site_species_totals_biomass_species_id_observatio_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_site_species_totals"/>
            <child column="observation_id" foreignKey="observed_stratum_species_tota_biomass_species_id_observati_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_stratum_species_totals"/>
            <child column="observation_id" foreignKey="observed_substratum_species_t_biomass_species_id_observati_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_substratum_species_totals"/>
            <child column="observation_id" foreignKey="recorded_trees_observation_id_biomass_species_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="recorded_trees"/>
            <parent column="id" foreignKey="observation_biomass_species_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="species_id" nullable="true" remarks="The ID of the plant's species, if known." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_biomass_species_species_id_fkey" implied="false" onDeleteCascade="false" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="scientific_name" nullable="true" remarks="The user-supplied scientific name of the plant's species. Must be provided if ID is null. Null if ID is known." size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="common_name" nullable="true" remarks="The user-supplied common name of the plant's species. Null if ID is known." size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="is_invasive" nullable="false" remarks="" size="1" type="bool" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="is_threatened" nullable="false" remarks="" size="1" type="bool" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="observation_biomass_species_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="observation_biomass_species_id_observation_id_key" unique="true">
            <column ascending="true" name="id"/>
            <column ascending="true" name="observation_id"/>
         </index>
         <index name="observation_biomass_species_observation_id_idx" unique="false">
            <column ascending="true" name="observation_id"/>
         </index>
         <index name="observation_biomass_species_observation_id_scientific_name_idx" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="scientific_name"/>
         </index>
         <index name="observation_biomass_species_observation_id_species_id_idx" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="species_id"/>
         </index>
         <checkConstraint constraint="(((species_id IS NOT NULL) AND (scientific_name IS NULL)) OR ((species_id IS NULL) AND (scientific_name IS NOT NULL)))" name="species_identifier"/>
      </table>
      <table name="observation_dependent_substrata" remarks="For a completed observation and each substratum in its geometry snapshot, the prior (or same) observation whose substratum results should be rolled forward. A materialization of the &quot;latest observation at or before this one that observed the substratum&quot; relationship. A substratum observed in the observation itself is stored as a self-reference." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="The consuming observation whose rolled-up results use the depended-on data." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_dependent_substrata_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="substratum_history_id" nullable="false" remarks="The substratum's history in the consuming observation's snapshot." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_dependent_substrata_substratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substratum_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="depends_on_observation_id" nullable="false" remarks="The observation whose substratum results are rolled forward; equals observation_id when the substratum was observed in the consuming observation." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_dependent_substrata_depends_on_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="depends_on_substratum_history_id" nullable="false" remarks="The substratum's history in the depended-on observation's snapshot." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_dependent_substra_depends_on_substratum_histor_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substratum_histories"/>
         </column>
         <primaryKey column="observation_id" sequenceNumberInPK="1"/>
         <primaryKey column="substratum_history_id" sequenceNumberInPK="2"/>
         <index name="observation_dependent_substrata_pkey" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="substratum_history_id"/>
         </index>
         <index name="observation_dependent_substra_depends_on_observation_id_dep_idx" unique="false">
            <column ascending="true" name="depends_on_observation_id"/>
            <column ascending="true" name="depends_on_substratum_history_id"/>
         </index>
      </table>
      <table name="observation_media_files" remarks="Observation-specific details about a photo or video of a monitoring plot. Generic metadata is in the `files` table." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="file_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_photos_file_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="files"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="observation_id" foreignKey="observation_photos_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_plots"/>
            <parent column="id" foreignKey="observation_photos_observation_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_photos_monitoring_plot_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="monitoring_plots"/>
            <parent column="monitoring_plot_id" foreignKey="observation_photos_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_plots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="position_id" nullable="true" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observation_photos_position_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_plot_positions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="type_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observation_photos_type_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_media_types"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="caption" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="is_original" nullable="false" remarks="If true, this photo was uploaded as part of the original observation data. If false, this photo was added after the observation." size="1" type="bool" typeCode="-7"/>
         <primaryKey column="file_id" sequenceNumberInPK="1"/>
         <index name="observation_photos_pkey" unique="true">
            <column ascending="true" name="file_id"/>
         </index>
         <index name="observation_photos_file_id_idx" unique="false">
            <column ascending="true" name="file_id"/>
         </index>
         <index name="observation_photos_monitoring_plot_id_idx" unique="false">
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
      </table>
      <table name="observation_media_types" remarks="(Enum) Types of observation plot media. This refers to the type of thing that's being depicted, not the content type of the media file." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="type_id" foreignKey="published_activity_observation_media_files_type_id_fkey" implied="false" onDeleteCascade="false" schema="funder" table="published_activity_observation_media_files"/>
            <child column="type_id" foreignKey="observation_photos_type_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_media_files"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="observation_photo_types_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="observation_photo_types_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="observation_plot_conditions" remarks="List of conditions observed in each monitoring plot." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="observation_id" foreignKey="observation_plot_conditions_observation_id_monitoring_plot_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plots"/>
            <parent column="id" foreignKey="observation_plot_conditions_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_plot_conditions_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
            <parent column="monitoring_plot_id" foreignKey="observation_plot_conditions_observation_id_monitoring_plot_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="condition_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observation_plot_conditions_condition_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observable_conditions"/>
         </column>
         <primaryKey column="observation_id" sequenceNumberInPK="1"/>
         <primaryKey column="monitoring_plot_id" sequenceNumberInPK="2"/>
         <primaryKey column="condition_id" sequenceNumberInPK="3"/>
         <index name="observation_plot_conditions_pkey" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_id"/>
            <column ascending="true" name="condition_id"/>
         </index>
         <index name="observation_plot_conditions_monitoring_plot_id_idx" unique="false">
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
      </table>
      <table name="observation_plot_positions" remarks="(Enum) Positions in a monitoring plot where users can take photos or record coordinates." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="position_id" foreignKey="published_activity_observation_media_files_position_id_fkey" implied="false" onDeleteCascade="false" schema="funder" table="published_activity_observation_media_files"/>
            <child column="position_id" foreignKey="observation_biomass_quadrat_details_position_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_quadrat_details"/>
            <child column="position_id" foreignKey="observation_biomass_quadrat_species_position_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_quadrat_species"/>
            <child column="position_id" foreignKey="observation_photos_position_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_media_files"/>
            <child column="position_id" foreignKey="observed_plot_coordinates_position_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observed_plot_coordinates"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="observation_photo_positions_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="observation_photo_positions_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="observation_plot_results" remarks="Observation results for a monitoring plot." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="observation_id" foreignKey="observation_plot_results_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plots"/>
            <parent column="id" foreignKey="observation_plot_results_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_plot_results_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
            <parent column="monitoring_plot_id" foreignKey="observation_plot_results_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="monitoring_plot_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_plot_results_monitoring_plot_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plot_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="total_live" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="total_dead" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="total_existing" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="permanent_live" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="survival_rate" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="plant_density" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="false" digits="0" id="9" name="needs_recalculation" nullable="false" remarks="If true, this row and the species totals for the same observation and scope are stale and will be rebuilt by the observation results recalculation job. Existing values are the last computed ones." size="1" type="bool" typeCode="-7"/>
         <primaryKey column="observation_id" sequenceNumberInPK="1"/>
         <primaryKey column="monitoring_plot_id" sequenceNumberInPK="2"/>
         <index name="observation_plot_results_pkey" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
         <index name="observation_plot_results_monitoring_plot_history_id_idx" unique="false">
            <column ascending="true" name="monitoring_plot_history_id"/>
         </index>
         <index name="observation_plot_results_observation_id_idx" unique="false">
            <column ascending="true" name="observation_id"/>
         </index>
         <index name="observation_plot_results_observation_id_monitoring_plot_his_idx" unique="false">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_history_id"/>
         </index>
      </table>
      <table name="observation_plot_statuses" remarks="(Enum) The status of an observation plot." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="status_id" foreignKey="observation_plots_status_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_plots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="observation_plot_statuses_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="observation_plot_statuses_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="observation_plots" remarks="Information about monitoring plots that are required to be surveyed as part of observations. This is not populated until the scheduled start time of the observation." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="observation_id" foreignKey="observation_biomass_details_observation_id_monitoring_plot_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_details"/>
            <child column="observation_id" foreignKey="observation_photos_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_media_files"/>
            <child column="observation_id" foreignKey="observation_plot_conditions_observation_id_monitoring_plot_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plot_conditions"/>
            <child column="observation_id" foreignKey="observation_plot_results_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plot_results"/>
            <child column="observation_id" foreignKey="observed_plot_coordinates_observation_id_monitoring_plot__fkey1" implied="false" onDeleteCascade="true" schema="tracking" table="observed_plot_coordinates"/>
            <child column="observation_id" foreignKey="plot_t0_observations_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="plot_t0_observations"/>
            <child column="observation_id" foreignKey="recorded_plants_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="recorded_plants"/>
            <parent column="id" foreignKey="observation_plots_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="monitoring_plot_id" foreignKey="observation_biomass_details_observation_id_monitoring_plot_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_details"/>
            <child column="monitoring_plot_id" foreignKey="observation_photos_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_media_files"/>
            <child column="monitoring_plot_id" foreignKey="observation_plot_conditions_observation_id_monitoring_plot_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plot_conditions"/>
            <child column="monitoring_plot_id" foreignKey="observation_plot_results_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plot_results"/>
            <child column="monitoring_plot_id" foreignKey="observed_plot_coordinates_observation_id_monitoring_plot__fkey1" implied="false" onDeleteCascade="true" schema="tracking" table="observed_plot_coordinates"/>
            <child column="monitoring_plot_id" foreignKey="plot_t0_observations_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="plot_t0_observations"/>
            <child column="monitoring_plot_id" foreignKey="recorded_plants_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="recorded_plants"/>
            <parent column="id" foreignKey="observation_plots_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="claimed_by" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_plots_claimed_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="3" name="claimed_time" nullable="true" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="completed_by" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_plots_completed_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="5" name="completed_time" nullable="true" remarks="Server-generated completion date and time. This is the time the observation was submitted to the server, not the time it was performed in the field." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="created_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_plots_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="7" name="created_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="is_permanent" nullable="false" remarks="If true, this plot was selected for observation as a permanent monitoring plot. If false, this plot was selected as a temporary monitoring plot." size="1" type="bool" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="modified_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_plots_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="10" name="modified_time" nullable="true" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="11" name="observed_time" nullable="true" remarks="Client-supplied observation date and time. This is the time the observation was performed in the field, not the time it was submitted to the server." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="notes" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="status_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observation_plots_status_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_plot_statuses"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="monitoring_plot_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_plots_monitoring_plot_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plot_histories"/>
         </column>
         <primaryKey column="observation_id" sequenceNumberInPK="1"/>
         <primaryKey column="monitoring_plot_id" sequenceNumberInPK="2"/>
         <index name="observation_plots_pkey" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
         <index name="observation_plots_monitoring_plot_history_id_idx" unique="false">
            <column ascending="true" name="monitoring_plot_history_id"/>
         </index>
         <index name="observation_plots_monitoring_plot_id_idx" unique="false">
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
         <checkConstraint constraint="((completed_by IS NULL) OR ((completed_by IS NOT NULL) AND (claimed_by IS NOT NULL)))" name="cannot_unclaim_completed_plot"/>
      </table>
      <table name="observation_requested_substrata" remarks="If an observation should only cover a specific set of substrata, the substratum IDs are stored here. If an observation is of the entire site (the default), there will be no rows for that observation in this table." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_requested_substrata_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="substratum_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_requested_substrata_substratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substrata"/>
         </column>
         <primaryKey column="observation_id" sequenceNumberInPK="1"/>
         <primaryKey column="substratum_id" sequenceNumberInPK="2"/>
         <index name="observation_requested_substrata_pkey" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="substratum_id"/>
         </index>
         <index name="observation_requested_substrata_substratum_id_idx" unique="false">
            <column ascending="true" name="substratum_id"/>
         </index>
      </table>
      <table name="observation_site_results" remarks="Observation results for a planting site." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_site_results_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="planting_site_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_site_results_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="planting_site_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_site_results_planting_site_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_site_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="total_live" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="total_dead" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="total_existing" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="permanent_live" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="survival_rate" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="survival_rate_std_dev" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="plant_density" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="plant_density_std_dev" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="survival_rate_area" nullable="true" remarks="Total area in hectares of substrata whose observation results contributed to the survival rate." size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="observed_density" nullable="true" remarks="Plant density (plants per hectare) based only on the plots observed in this observation, without carrying forward last-observed data for substrata that were not observed." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="false" digits="0" id="13" name="needs_recalculation" nullable="false" remarks="If true, this row and the species totals for the same observation and scope are stale and will be rebuilt by the observation results recalculation job. Existing values are the last computed ones." size="1" type="bool" typeCode="-7"/>
         <primaryKey column="observation_id" sequenceNumberInPK="1"/>
         <index name="observation_site_results_pkey" unique="true">
            <column ascending="true" name="observation_id"/>
         </index>
         <index name="observation_site_results_observation_id_idx" unique="false">
            <column ascending="true" name="observation_id"/>
         </index>
         <index name="observation_site_results_planting_site_id_idx" unique="false">
            <column ascending="true" name="planting_site_id"/>
         </index>
      </table>
      <table name="observation_states" remarks="(Enum) Where in the observation lifecycle a particular observation is." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="state_id" foreignKey="observations_state_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="observation_states_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="observation_states_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="observation_stratum_results" remarks="Observation results for a stratum." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_stratum_results_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="stratum_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_stratum_results_stratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="strata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="stratum_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_stratum_results_stratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="stratum_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="total_live" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="total_dead" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="total_existing" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="permanent_live" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="survival_rate" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="survival_rate_std_dev" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="plant_density" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="plant_density_std_dev" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="survival_rate_area" nullable="true" remarks="Total area in hectares of substrata whose observation results contributed to the survival rate." size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="observed_density" nullable="true" remarks="Plant density (plants per hectare) based only on the plots observed in this observation, without carrying forward last-observed data for substrata that were not observed." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="false" digits="0" id="13" name="needs_recalculation" nullable="false" remarks="If true, this row and the species totals for the same observation and scope are stale and will be rebuilt by the observation results recalculation job. Existing values are the last computed ones." size="1" type="bool" typeCode="-7"/>
         <primaryKey column="observation_id" sequenceNumberInPK="1"/>
         <primaryKey column="stratum_history_id" sequenceNumberInPK="2"/>
         <index name="observation_stratum_results_pkey" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="stratum_history_id"/>
         </index>
         <index name="observation_stratum_results_observation_id_idx" unique="false">
            <column ascending="true" name="observation_id"/>
         </index>
         <index name="observation_stratum_results_stratum_id_idx" unique="false">
            <column ascending="true" name="stratum_id"/>
         </index>
      </table>
      <table name="observation_substratum_results" remarks="Observation results for a substratum." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_substratum_results_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="substratum_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_substratum_results_substratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="substratum_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observation_substratum_results_substratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substratum_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="total_live" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="total_dead" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="total_existing" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="permanent_live" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="survival_rate" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="survival_rate_std_dev" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="plant_density" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="plant_density_std_dev" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="survival_rate_area" nullable="true" remarks="This substratum's area in hectares at the time of the observation." size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="false" digits="0" id="12" name="needs_recalculation" nullable="false" remarks="If true, this row and the species totals for the same observation and scope are stale and will be rebuilt by the observation results recalculation job. Existing values are the last computed ones." size="1" type="bool" typeCode="-7"/>
         <primaryKey column="observation_id" sequenceNumberInPK="1"/>
         <primaryKey column="substratum_history_id" sequenceNumberInPK="2"/>
         <index name="observation_substratum_results_pkey" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="substratum_history_id"/>
         </index>
         <index name="observation_substratum_results_observation_id_idx" unique="false">
            <column ascending="true" name="observation_id"/>
         </index>
         <index name="observation_substratum_results_substratum_id_idx" unique="false">
            <column ascending="true" name="substratum_id"/>
         </index>
      </table>
      <table name="observation_types" remarks="(Enum) Type of observation, currently only used for ad hoc observations." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="observation_type_id" foreignKey="observations_observation_type_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="observation_types_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="observation_types_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="observations" remarks="Scheduled observations of planting sites. This table may contain rows describing future observations as well as current and past ones." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="observation_id" foreignKey="activity_observations_observation_id_fkey" implied="false" onDeleteCascade="true" schema="accelerator" table="activity_observations"/>
            <child column="observation_id" foreignKey="published_activity_observations_observation_id_fkey" implied="false" onDeleteCascade="true" schema="funder" table="published_activity_observations"/>
            <child column="observation_id" foreignKey="observation_biomass_additional_species_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_additional_species"/>
            <child column="observation_id" foreignKey="observation_biomass_details_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_details"/>
            <child column="observation_id" foreignKey="observation_biomass_quadrat_details_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_quadrat_details"/>
            <child column="observation_id" foreignKey="observation_biomass_quadrat_species_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_quadrat_species"/>
            <child column="observation_id" foreignKey="observation_biomass_species_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_species"/>
            <child column="depends_on_observation_id" foreignKey="observation_dependent_substrata_depends_on_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_dependent_substrata"/>
            <child column="observation_id" foreignKey="observation_dependent_substrata_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_dependent_substrata"/>
            <child column="observation_id" foreignKey="observation_photos_observation_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_media_files"/>
            <child column="observation_id" foreignKey="observation_plot_conditions_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plot_conditions"/>
            <child column="observation_id" foreignKey="observation_plot_results_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plot_results"/>
            <child column="observation_id" foreignKey="observation_plots_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plots"/>
            <child column="observation_id" foreignKey="observation_requested_substrata_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_requested_substrata"/>
            <child column="observation_id" foreignKey="observation_site_results_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_site_results"/>
            <child column="observation_id" foreignKey="observation_stratum_results_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_stratum_results"/>
            <child column="observation_id" foreignKey="observation_substratum_results_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_substratum_results"/>
            <child column="observation_id" foreignKey="observed_plot_coordinates_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_plot_coordinates"/>
            <child column="observation_id" foreignKey="observed_plot_species_totals_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_plot_species_totals"/>
            <child column="observation_id" foreignKey="observed_site_species_totals_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_site_species_totals"/>
            <child column="observation_id" foreignKey="observed_stratum_species_totals_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_stratum_species_totals"/>
            <child column="observation_id" foreignKey="observed_substratum_species_totals_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_substratum_species_totals"/>
            <child column="observation_id" foreignKey="plot_t0_observations_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="plot_t0_observations"/>
            <child column="observation_id" foreignKey="recorded_plants_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="recorded_plants"/>
            <child column="observation_id" foreignKey="recorded_trees_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="recorded_trees"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="planting_site_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observations_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="2" name="created_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="start_date" nullable="false" remarks="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." size="13" type="date" typeCode="91"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="end_date" nullable="false" remarks="Last day of the observation. This is typically the last day of the same month as `start_date`." size="13" type="date" typeCode="91"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="5" name="completed_time" nullable="true" remarks="Server-generated date and time the final piece of data for the observation was received." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="state_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observations_state_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_states"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="7" name="upcoming_notification_sent_time" nullable="true" remarks="When the notification that the observation is starting in 1 month was sent. Null if the notification has not been sent yet." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="planting_site_history_id" nullable="true" remarks="Which version of the planting site map was used for the observation. Null for upcoming observations since monitoring plots are only placed on the map when an observation starts." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observations_planting_site_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_site_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="observation_type_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observations_observation_type_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_types"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="is_ad_hoc" nullable="false" remarks="" size="1" type="bool" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="observations_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="observations_planting_site_history_id_idx" unique="false">
            <column ascending="true" name="planting_site_history_id"/>
         </index>
         <index name="observations_planting_site_id_idx" unique="false">
            <column ascending="true" name="planting_site_id"/>
         </index>
         <checkConstraint constraint="(((completed_time IS NULL) AND (state_id &lt;&gt; ALL (ARRAY[3, 5]))) OR ((completed_time IS NOT NULL) AND (state_id = ANY (ARRAY[3, 5]))))" name="completed_time_and_state"/>
         <checkConstraint constraint="(start_date &lt;= end_date)" name="end_after_start"/>
         <checkConstraint constraint="(((state_id = 1) AND (planting_site_history_id IS NULL)) OR ((state_id &lt;&gt; 1) AND (planting_site_history_id IS NOT NULL)))" name="history_id_required_at_start"/>
      </table>
      <table name="observed_plot_coordinates" remarks="Observed GPS coordinates in monitoring plots. Does not include photo coordinates or coordinates of recorded plants." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="observation_id" foreignKey="observed_plot_coordinates_observation_id_monitoring_plot__fkey1" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plots"/>
            <parent column="id" foreignKey="observed_plot_coordinates_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_plot_coordinates_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
            <parent column="monitoring_plot_id" foreignKey="observed_plot_coordinates_observation_id_monitoring_plot__fkey1" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="position_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observed_plot_coordinates_position_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_plot_positions"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="gps_coordinates" nullable="false" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="observed_plot_coordinates_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="one_point_per_position" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_id"/>
            <column ascending="true" name="position_id"/>
         </index>
      </table>
      <table name="observed_plot_species_totals" remarks="Aggregated per-monitoring-plot, per-species totals of plants recorded during observations." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="observation_id" foreignKey="observed_plot_species_totals_biomass_species_id_observatio_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_species"/>
            <parent column="id" foreignKey="observed_plot_species_totals_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_plot_species_totals_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="species_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_plot_species_totals_species_id_fkey" implied="false" onDeleteCascade="false" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="species_name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="certainty_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observed_plot_species_totals_certainty_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="recorded_species_certainties"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="total_live" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="total_dead" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="total_existing" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="permanent_live" nullable="false" remarks="If this is a permanent monitoring plot, the number of live plants observed, not including existing plants. 0 otherwise." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="survival_rate" nullable="true" remarks="If this is a permanent monitoring plot, percentage of plants of the species observed in this plot, in either this observation or in previous ones, that have survived since the t0 point. Null if this is not a permanent monitoring plot in the current observation." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="monitoring_plot_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_plot_species_totals_monitoring_plot_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plot_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="biomass_species_id" nullable="true" remarks="Species identity for biomass totals. Null for plant monitoring totals." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_plot_species_totals_biomass_species_id_observatio_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_species"/>
         </column>
         <index name="observed_plot_species_totals_biomass_species_id_observation_idx" unique="true">
            <column ascending="true" name="biomass_species_id"/>
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_history_id"/>
         </index>
         <index name="observed_plot_species_totals_monitoring_plot_id_idx" unique="false">
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
         <index name="observed_plot_species_totals_observation_id_idx" unique="false">
            <column ascending="true" name="observation_id"/>
         </index>
         <index name="observed_plot_species_totals_observation_id_monitoring_plo_idx1" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_id"/>
            <column ascending="true" name="species_name"/>
         </index>
         <index name="observed_plot_species_totals_observation_id_monitoring_plo_idx2" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
         <index name="observed_plot_species_totals_observation_id_monitoring_plo_idx3" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_history_id"/>
            <column ascending="true" name="species_id"/>
         </index>
         <index name="observed_plot_species_totals_observation_id_monitoring_plo_idx4" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_history_id"/>
            <column ascending="true" name="species_name"/>
         </index>
         <index name="observed_plot_species_totals_observation_id_monitoring_plo_idx5" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_history_id"/>
         </index>
         <index name="observed_plot_species_totals_observation_id_monitoring_plot_idx" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_id"/>
            <column ascending="true" name="species_id"/>
         </index>
         <index name="observed_plot_species_totals_species_id_idx" unique="false">
            <column ascending="true" name="species_id"/>
         </index>
         <checkConstraint constraint="(((certainty_id = 1) AND (species_id IS NOT NULL) AND (species_name IS NULL)) OR ((certainty_id = 2) AND (species_id IS NULL) AND (species_name IS NOT NULL)) OR ((certainty_id = 3) AND (species_id IS NULL) AND (species_name IS NULL)))" name="species_identifier_for_certainty"/>
      </table>
      <table name="observed_site_species_totals" remarks="Aggregated per-planting-site, per-species totals of plants recorded during observations." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="observation_id" foreignKey="observed_site_species_totals_biomass_species_id_observatio_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_species"/>
            <parent column="id" foreignKey="observed_site_species_totals_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="planting_site_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_site_species_totals_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="species_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_site_species_totals_species_id_fkey" implied="false" onDeleteCascade="false" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="species_name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="certainty_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observed_site_species_totals_certainty_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="recorded_species_certainties"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="total_live" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="total_dead" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="total_existing" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="permanent_live" nullable="false" remarks="The number of live plants observed in permanent monitoring plots, not including existing plants." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="survival_rate" nullable="true" remarks="Percentage of plants of the species observed in permanent monitoring plots in the planting site, in either this observation or in previous ones, that have survived since the t0 point." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="planting_site_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_site_species_totals_planting_site_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_site_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="biomass_species_id" nullable="true" remarks="Species identity for biomass totals. Null for plant monitoring totals." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_site_species_totals_biomass_species_id_observatio_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_species"/>
         </column>
         <index name="observed_site_species_totals_biomass_species_id_observation_idx" unique="true">
            <column ascending="true" name="biomass_species_id"/>
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="planting_site_history_id"/>
         </index>
         <index name="observed_site_species_totals_observation_id_idx" unique="false">
            <column ascending="true" name="observation_id"/>
         </index>
         <index name="observed_site_species_totals_observation_id_planting_site__idx1" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="planting_site_id"/>
            <column ascending="true" name="species_name"/>
         </index>
         <index name="observed_site_species_totals_observation_id_planting_site__idx2" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="planting_site_id"/>
         </index>
         <index name="observed_site_species_totals_observation_id_planting_site__idx3" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="planting_site_history_id"/>
            <column ascending="true" name="species_name"/>
         </index>
         <index name="observed_site_species_totals_observation_id_planting_site__idx4" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="planting_site_history_id"/>
         </index>
         <index name="observed_site_species_totals_observation_id_planting_site_h_idx" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="planting_site_history_id"/>
            <column ascending="true" name="species_id"/>
         </index>
         <index name="observed_site_species_totals_observation_id_planting_site_i_idx" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="planting_site_id"/>
            <column ascending="true" name="species_id"/>
         </index>
         <index name="observed_site_species_totals_planting_site_id_idx" unique="false">
            <column ascending="true" name="planting_site_id"/>
         </index>
         <index name="observed_site_species_totals_species_id_idx" unique="false">
            <column ascending="true" name="species_id"/>
         </index>
         <checkConstraint constraint="(((certainty_id = 1) AND (species_id IS NOT NULL) AND (species_name IS NULL)) OR ((certainty_id = 2) AND (species_id IS NULL) AND (species_name IS NOT NULL)) OR ((certainty_id = 3) AND (species_id IS NULL) AND (species_name IS NULL)))" name="species_identifier_for_certainty"/>
      </table>
      <table name="observed_stratum_species_totals" remarks="Aggregated per-stratum, per-species totals of plants recorded during observations." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="observation_id" foreignKey="observed_stratum_species_tota_biomass_species_id_observati_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_species"/>
            <parent column="id" foreignKey="observed_stratum_species_totals_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="stratum_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_stratum_species_totals_stratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="strata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="species_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_stratum_species_totals_species_id_fkey" implied="false" onDeleteCascade="false" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="species_name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="certainty_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observed_stratum_species_totals_certainty_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="recorded_species_certainties"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="total_live" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="total_dead" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="total_existing" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="permanent_live" nullable="false" remarks="The number of live plants observed in permanent monitoring plots, not including existing plants." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="survival_rate" nullable="true" remarks="Percentage of plants of the species observed in permanent monitoring plots in the stratum, in either the current observation or in previous ones, that have survived since the t0 point." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="stratum_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_stratum_species_totals_stratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="stratum_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="biomass_species_id" nullable="true" remarks="Species identity for biomass totals. Null for plant monitoring totals." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_stratum_species_tota_biomass_species_id_observati_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_species"/>
         </column>
         <index name="observed_stratum_species_tota_biomass_species_id_observatio_idx" unique="true">
            <column ascending="true" name="biomass_species_id"/>
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="stratum_history_id"/>
         </index>
         <index name="observed_stratum_species_tota_observation_id_stratum_histo_idx1" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="stratum_history_id"/>
            <column ascending="true" name="species_name"/>
         </index>
         <index name="observed_stratum_species_tota_observation_id_stratum_histo_idx2" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="stratum_history_id"/>
         </index>
         <index name="observed_stratum_species_tota_observation_id_stratum_histor_idx" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="stratum_history_id"/>
            <column ascending="true" name="species_id"/>
         </index>
         <index name="observed_stratum_species_totals_observation_id_idx" unique="false">
            <column ascending="true" name="observation_id"/>
         </index>
         <index name="observed_stratum_species_totals_species_id_idx" unique="false">
            <column ascending="true" name="species_id"/>
         </index>
         <index name="observed_stratum_species_totals_stratum_id_idx" unique="false">
            <column ascending="true" name="stratum_id"/>
         </index>
         <checkConstraint constraint="(((certainty_id = 1) AND (species_id IS NOT NULL) AND (species_name IS NULL)) OR ((certainty_id = 2) AND (species_id IS NULL) AND (species_name IS NOT NULL)) OR ((certainty_id = 3) AND (species_id IS NULL) AND (species_name IS NULL)))" name="species_identifier_for_certainty"/>
      </table>
      <table name="observed_substratum_species_totals" remarks="Aggregated per-substratum, per-species totals of plants recorded during observations." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="observation_id" foreignKey="observed_substratum_species_t_biomass_species_id_observati_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_species"/>
            <parent column="id" foreignKey="observed_substratum_species_totals_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="substratum_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_substratum_species_totals_substratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="species_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_substratum_species_totals_species_id_fkey" implied="false" onDeleteCascade="false" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="species_name" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="certainty_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="observed_substratum_species_totals_certainty_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="recorded_species_certainties"/>
         </column>
         <column autoUpdated="false" defaultValue="0" digits="0" id="5" name="total_live" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="6" name="total_dead" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="7" name="total_existing" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="0" digits="0" id="8" name="permanent_live" nullable="false" remarks="The number of live plants observed in permanent monitoring plots, not including existing plants." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="survival_rate" nullable="true" remarks="Percentage of plants of the species observed in permanent monitoring plots in the substratum, in either the current observation or in previous ones, that have survived since the t0 point." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="substratum_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_substratum_species_totals_substratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substratum_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="biomass_species_id" nullable="true" remarks="Species identity for biomass totals. Null for plant monitoring totals." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="observed_substratum_species_t_biomass_species_id_observati_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_biomass_species"/>
         </column>
         <index name="observed_substratum_species_t_biomass_species_id_observatio_idx" unique="true">
            <column ascending="true" name="biomass_species_id"/>
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="substratum_history_id"/>
         </index>
         <index name="observed_substratum_species_t_observation_id_substratum_hi_idx1" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="substratum_history_id"/>
            <column ascending="true" name="species_name"/>
         </index>
         <index name="observed_substratum_species_t_observation_id_substratum_hi_idx2" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="substratum_history_id"/>
         </index>
         <index name="observed_substratum_species_t_observation_id_substratum_his_idx" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="substratum_history_id"/>
            <column ascending="true" name="species_id"/>
         </index>
         <index name="observed_substratum_species_totals_observation_id_idx" unique="false">
            <column ascending="true" name="observation_id"/>
         </index>
         <index name="observed_substratum_species_totals_species_id_idx" unique="false">
            <column ascending="true" name="species_id"/>
         </index>
         <index name="observed_substratum_species_totals_substratum_id_idx" unique="false">
            <column ascending="true" name="substratum_id"/>
         </index>
         <checkConstraint constraint="(((certainty_id = 1) AND (species_id IS NOT NULL) AND (species_name IS NULL)) OR ((certainty_id = 2) AND (species_id IS NULL) AND (species_name IS NOT NULL)) OR ((certainty_id = 3) AND (species_id IS NULL) AND (species_name IS NULL)))" name="species_identifier_for_certainty"/>
      </table>
      <table name="planting_date_request_species" remarks="Quantities of each species requested for a planting date." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="scheduled_planting_date_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="scheduled_planting_date_id" foreignKey="planting_date_request_species_scheduled_planting_date_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_date_requests"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="substratum_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_date_request_species_substratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="species_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_date_request_species_species_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="quantity" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <primaryKey column="scheduled_planting_date_id" sequenceNumberInPK="1"/>
         <primaryKey column="substratum_id" sequenceNumberInPK="2"/>
         <primaryKey column="species_id" sequenceNumberInPK="3"/>
         <index name="planting_date_request_species_pkey" unique="true">
            <column ascending="true" name="scheduled_planting_date_id"/>
            <column ascending="true" name="substratum_id"/>
            <column ascending="true" name="species_id"/>
         </index>
         <index name="planting_date_request_species_species_id_idx" unique="false">
            <column ascending="true" name="species_id"/>
         </index>
         <index name="planting_date_request_species_substratum_id_idx" unique="false">
            <column ascending="true" name="substratum_id"/>
         </index>
         <checkConstraint constraint="(quantity &gt;= 0)" name="planting_date_request_species_quantity_check"/>
      </table>
      <table name="planting_date_request_statuses" remarks="(Enum) Possible statuses of a planting date request." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="status_id" foreignKey="planting_date_requests_status_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="planting_date_requests"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="planting_date_request_statuses_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="planting_date_request_statuses_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="planting_date_requests" remarks="Requested planting date for a planting season." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="scheduled_planting_date_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="scheduled_planting_date_request_id" foreignKey="withdrawals_scheduled_planting_date_request_id_fkey" implied="false" onDeleteCascade="false" schema="nursery" table="withdrawals"/>
            <child column="scheduled_planting_date_id" foreignKey="planting_date_request_species_scheduled_planting_date_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_date_request_species"/>
            <parent column="id" foreignKey="planting_date_requests_scheduled_planting_date_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="scheduled_planting_dates"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="date" nullable="false" remarks="" size="13" type="date" typeCode="91"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="created_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_date_requests_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="3" name="created_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="modified_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_date_requests_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="5" name="modified_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="notes" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="status_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="planting_date_requests_status_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="planting_date_request_statuses"/>
         </column>
         <column autoUpdated="false" defaultValue="false" digits="0" id="8" name="manually_fulfilled" nullable="false" remarks="Whether the request was marked fulfilled manually rather than by nursery withdrawals." size="1" type="bool" typeCode="-7"/>
         <primaryKey column="scheduled_planting_date_id" sequenceNumberInPK="1"/>
         <index name="planting_date_requests_pkey" unique="true">
            <column ascending="true" name="scheduled_planting_date_id"/>
         </index>
         <checkConstraint constraint="((NOT manually_fulfilled) OR (status_id = 3))" name="planting_date_requests_manually_fulfilled_status"/>
      </table>
      <table name="planting_season_allocated_species" remarks="Quantities of each species allocated for a planting season." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="planting_season_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_season_allocated_species_planting_season_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_seasons"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="species_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_season_allocated_species_species_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="quantity" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="created_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_season_allocated_species_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="4" name="created_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="modified_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_season_allocated_species_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="6" name="modified_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <primaryKey column="planting_season_id" sequenceNumberInPK="1"/>
         <primaryKey column="species_id" sequenceNumberInPK="2"/>
         <index name="planting_season_allocated_species_pkey" unique="true">
            <column ascending="true" name="planting_season_id"/>
            <column ascending="true" name="species_id"/>
         </index>
         <index name="planting_season_allocated_species_species_id_idx" unique="false">
            <column ascending="true" name="species_id"/>
         </index>
         <checkConstraint constraint="(quantity &gt;= 0)" name="planting_season_allocated_species_quantity_check"/>
      </table>
      <table name="planting_season_notification_pages" remarks="(Enum) UI pages on which planting season notifications can be displayed and dismissed." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="page_id" foreignKey="planting_season_notifications_page_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="planting_season_notifications"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="planting_season_notification_pages_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="planting_season_notification_pages_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="planting_season_notifications" remarks="Stores the last dismissed event log id for each planting season and notification page in order to look up all events since." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="planting_season_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_season_notifications_planting_season_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_seasons"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="page_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="planting_season_notifications_page_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="planting_season_notification_pages"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="last_dismissed_event_log_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_season_notifications_last_dismissed_event_log_id_fkey" implied="false" onDeleteCascade="false" schema="public" table="event_log"/>
         </column>
         <primaryKey column="planting_season_id" sequenceNumberInPK="1"/>
         <primaryKey column="page_id" sequenceNumberInPK="2"/>
         <index name="planting_season_notifications_pkey" unique="true">
            <column ascending="true" name="planting_season_id"/>
            <column ascending="true" name="page_id"/>
         </index>
      </table>
      <table name="planting_season_species_targets" remarks="Target quantities of each species to plant in each substratum for a planting season." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="planting_season_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_season_species_targets_planting_season_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_seasons"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="substratum_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_season_species_targets_substratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="species_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_season_species_targets_species_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="quantity" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="created_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_season_species_targets_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="5" name="created_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="modified_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_season_species_targets_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="7" name="modified_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <primaryKey column="planting_season_id" sequenceNumberInPK="1"/>
         <primaryKey column="substratum_id" sequenceNumberInPK="2"/>
         <primaryKey column="species_id" sequenceNumberInPK="3"/>
         <index name="planting_season_species_targets_pkey" unique="true">
            <column ascending="true" name="planting_season_id"/>
            <column ascending="true" name="substratum_id"/>
            <column ascending="true" name="species_id"/>
         </index>
         <index name="planting_season_species_targets_species_id_idx" unique="false">
            <column ascending="true" name="species_id"/>
         </index>
         <index name="planting_season_species_targets_substratum_id_idx" unique="false">
            <column ascending="true" name="substratum_id"/>
         </index>
         <checkConstraint constraint="(quantity &gt;= 0)" name="planting_season_species_targets_quantity_check"/>
      </table>
      <table name="planting_season_statuses" remarks="(Enum) Possible statuses of a planting season." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="status_id" foreignKey="planting_seasons_status_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="planting_seasons"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="planting_season_statuses_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="planting_season_statuses_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="planting_seasons" remarks="Named planting seasons for planting sites, with start and end dates." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="planting_season_id" foreignKey="withdrawals_planting_season_id_fkey" implied="false" onDeleteCascade="false" schema="nursery" table="withdrawals"/>
            <child column="planting_season_id" foreignKey="planting_season_allocated_species_planting_season_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_season_allocated_species"/>
            <child column="planting_season_id" foreignKey="planting_season_notifications_planting_season_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_season_notifications"/>
            <child column="planting_season_id" foreignKey="planting_season_species_targets_planting_season_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_season_species_targets"/>
            <child column="planting_season_id" foreignKey="scheduled_planting_dates_planting_season_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="scheduled_planting_dates"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="planting_site_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_seasons_planting_site_id_fkey1" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="start_date" nullable="false" remarks="" size="13" type="date" typeCode="91"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="end_date" nullable="false" remarks="" size="13" type="date" typeCode="91"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="status_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="planting_seasons_status_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="planting_season_statuses"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="created_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_seasons_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="7" name="created_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="modified_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_seasons_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="9" name="modified_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="planting_seasons_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="planting_seasons_planting_site_id_idx" unique="false">
            <column ascending="true" name="planting_site_id"/>
         </index>
         <index name="planting_seasons_planting_site_id_name_key" unique="true">
            <column ascending="true" name="planting_site_id"/>
            <column ascending="true" name="name"/>
         </index>
         <checkConstraint constraint="(end_date &gt;= start_date)" name="planting_seasons_check"/>
      </table>
      <table name="planting_site_histories" remarks="Versions of planting site maps over time. Each time a planting site map changes, the new map is inserted into this table and its child tables." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="planting_site_history_id" foreignKey="monitoring_plot_histories_planting_site_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plot_histories"/>
            <child column="planting_site_history_id" foreignKey="observation_site_results_planting_site_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_site_results"/>
            <child column="planting_site_history_id" foreignKey="observations_planting_site_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
            <child column="planting_site_history_id" foreignKey="observed_site_species_totals_planting_site_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_site_species_totals"/>
            <child column="planting_site_history_id" foreignKey="simplified_planting_site_historie_planting_site_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="simplified_planting_site_histories"/>
            <child column="planting_site_history_id" foreignKey="stratum_histories_planting_site_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="stratum_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="planting_site_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_site_histories_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="created_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_site_histories_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="3" name="created_time" nullable="false" remarks="When the site map was created or updated. You can determine which map was active for a site at a particular time by looking for the maximum `created_time` less than or equal to the time in question." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="boundary" nullable="false" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="grid_origin" nullable="true" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="exclusion" nullable="true" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="area_ha" nullable="true" remarks="" size="0" type="numeric" typeCode="2"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="planting_site_histories_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="planting_site_histories_planting_site_id_idx" unique="false">
            <column ascending="true" name="planting_site_id"/>
         </index>
      </table>
      <table name="planting_site_notifications" remarks="Tracks which notifications have already been sent regarding planting sites." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="planting_site_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_site_notifications_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="notification_type_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="planting_site_notifications_notification_type_id_fkey" implied="false" onDeleteCascade="false" schema="public" table="notification_types"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="notification_number" nullable="false" remarks="Number of notifications of this type that have been sent, including this one. 1 for initial notification, 2 for reminder, 3 for second reminder, etc." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="4" name="sent_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="planting_site_notifications_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="planting_site_notifications_planting_site_id_notification_t_key" unique="true">
            <column ascending="true" name="planting_site_id"/>
            <column ascending="true" name="notification_type_id"/>
            <column ascending="true" name="notification_number"/>
         </index>
      </table>
      <table name="planting_site_populations" remarks="Total number of plants of each species in each planting site." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="planting_site_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_site_populations_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="species_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_site_populations_species_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="total_plants" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <primaryKey column="planting_site_id" sequenceNumberInPK="1"/>
         <primaryKey column="species_id" sequenceNumberInPK="2"/>
         <index name="planting_site_populations_pkey" unique="true">
            <column ascending="true" name="planting_site_id"/>
            <column ascending="true" name="species_id"/>
         </index>
      </table>
      <table name="planting_site_species_targets" remarks="Which species are intended to be planted at each planting site." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="planting_site_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="planting_site_id" foreignKey="species_must_be_targeted_to_site" implied="false" onDeleteCascade="true" schema="tracking" table="stratum_species_targets"/>
            <parent column="id" foreignKey="planting_site_species_targets_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="species_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="species_id" foreignKey="species_must_be_targeted_to_site" implied="false" onDeleteCascade="true" schema="tracking" table="stratum_species_targets"/>
            <parent column="id" foreignKey="planting_site_species_targets_species_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="target_plants" nullable="true" remarks="" size="19" type="int8" typeCode="-5"/>
         <primaryKey column="planting_site_id" sequenceNumberInPK="1"/>
         <primaryKey column="species_id" sequenceNumberInPK="2"/>
         <index name="planting_site_species_targets_pkey" unique="true">
            <column ascending="true" name="planting_site_id"/>
            <column ascending="true" name="species_id"/>
         </index>
         <index name="planting_site_species_targets_species_id_idx" unique="false">
            <column ascending="true" name="species_id"/>
         </index>
      </table>
      <table name="planting_sites" remarks="Top-level information about entire planting sites. Every planting site has at least one stratum." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="planting_site_id" foreignKey="deliveries_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="deliveries"/>
            <child column="planting_site_id" foreignKey="monitoring_plot_histories_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plot_histories"/>
            <child column="planting_site_id" foreignKey="monitoring_plots_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
            <child column="planting_site_id" foreignKey="observation_site_results_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_site_results"/>
            <child column="planting_site_id" foreignKey="observations_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
            <child column="planting_site_id" foreignKey="observed_site_species_totals_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_site_species_totals"/>
            <child column="planting_site_id" foreignKey="planting_seasons_planting_site_id_fkey1" implied="false" onDeleteCascade="true" schema="tracking" table="planting_seasons"/>
            <child column="planting_site_id" foreignKey="planting_site_histories_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_site_histories"/>
            <child column="planting_site_id" foreignKey="planting_site_notifications_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_site_notifications"/>
            <child column="planting_site_id" foreignKey="planting_site_populations_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_site_populations"/>
            <child column="planting_site_id" foreignKey="planting_site_species_targets_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_site_species_targets"/>
            <child column="planting_site_id" foreignKey="plantings_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="plantings"/>
            <child column="planting_site_id" foreignKey="simplified_planting_sites_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="simplified_planting_sites"/>
            <child column="planting_site_id" foreignKey="strata_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="strata"/>
            <child column="planting_site_id" foreignKey="stratum_species_targets_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="stratum_species_targets"/>
            <child column="planting_site_id" foreignKey="substrata_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="organization_id" nullable="false" remarks="Which organization owns this planting site." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_sites_organization_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="organizations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="name" nullable="false" remarks="Short name of this planting site. Must be unique within the organization." size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="description" nullable="true" remarks="Optional user-supplied description of the planting site." size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="boundary" nullable="true" remarks="Boundary of the entire planting site. strata will generally fall inside this boundary. This will typically be a single polygon but may be multiple polygons if a planting site has several disjoint areas. Coordinates always use SRID 4326 (WGS 84 latitude/longitude)." size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="created_by" nullable="false" remarks="Which user created the planting site." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_sites_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="6" name="created_time" nullable="false" remarks="When the planting site was originally created." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="modified_by" nullable="false" remarks="Which user most recently modified the planting site." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_sites_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="8" name="modified_time" nullable="false" remarks="When the planting site was most recently modified." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="time_zone" nullable="true" remarks="" size="2147483647" type="text" typeCode="12">
            <parent column="time_zone" foreignKey="planting_sites_time_zone_fkey" implied="false" onDeleteCascade="false" schema="public" table="time_zones"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="area_ha" nullable="true" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="project_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="planting_sites_project_id_fkey" implied="false" onDeleteCascade="false" schema="public" table="projects"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="exclusion" nullable="true" remarks="Optional area to exclude from a site. No monitoring plots will be located in this area." size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="grid_origin" nullable="true" remarks="Coordinates of the origin point of the grid of monitoring plots. Monitoring plot corners have X and Y coordinates that are multiples of 25 meters from the origin point." size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="country_code" nullable="true" remarks="" size="2147483647" type="text" typeCode="12">
            <parent column="code" foreignKey="planting_sites_country_code_fkey" implied="false" onDeleteCascade="false" schema="public" table="countries"/>
         </column>
         <column autoUpdated="false" defaultValue="false" digits="0" id="15" name="survival_rate_includes_temp_plots" nullable="false" remarks="" size="1" type="bool" typeCode="-7"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="planting_sites_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="planting_sites_organization_id_name_key" unique="true">
            <column ascending="true" name="organization_id"/>
            <column ascending="true" name="name"/>
         </index>
         <index name="planting_sites_project_id_idx" unique="false">
            <column ascending="true" name="project_id"/>
         </index>
         <checkConstraint constraint="(area_ha &gt; (0)::numeric)" name="area_positive"/>
         <checkConstraint constraint="(description !~ similar_to_escape(' *'::text))" name="planting_sites_description_check"/>
      </table>
      <table name="planting_types" remarks="(Enum) Type of planting associated with a delivery. Different planting types distinguish reassignments from initial plantings." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="planting_type_id" foreignKey="plantings_planting_type_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="plantings"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="planting_types_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
      </table>
      <table name="plantings" remarks="Details about plants that were planted or reassigned as part of a delivery. There is one plantings row per species in a delivery." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="delivery_id" nullable="false" remarks="Which delivery this planting is part of." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="plantings_planting_site_id_delivery_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="deliveries"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="planting_type_id" nullable="false" remarks="Whether this is the plant assignment from the initial delivery or an adjustment from a reassignment." size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="plantings_planting_type_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="planting_types"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="planting_site_id" nullable="false" remarks="Which planting site has the planting. Must be the same as the planting site ID of the delivery. This identifies the site as a whole; in addition, there may be a plot ID." size="19" type="int8" typeCode="-5">
            <parent column="planting_site_id" foreignKey="plantings_planting_site_id_delivery_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="deliveries"/>
            <parent column="id" foreignKey="plantings_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
            <parent column="planting_site_id" foreignKey="plantings_planting_site_id_substratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="substratum_id" nullable="true" remarks="Which plot this planting affected, if any. Must be a plot at the planting site referenced by `planting_site_id`. Null if the planting site does not have plot information. For reassignments, this is the original plot if `num_plants` is negative, or the new plot if `num_plants` is positive." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="plantings_substratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="species_id" nullable="false" remarks="Which species was planted." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="plantings_species_id_fkey" implied="false" onDeleteCascade="false" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="created_by" nullable="false" remarks="Which user created the planting." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="plantings_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="7" name="created_time" nullable="false" remarks="When the planting was created. Note that plantings are never updated, so there is no modified time." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="num_plants" nullable="false" remarks="Number of plants that were planted (if the number is positive) or reassigned (if the number is negative)." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="notes" nullable="true" remarks="Notes about this specific planting. In the initial version of the web app, the user can only enter per-planting notes for reassignments, not for initial deliveries." size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="plantings_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="plantings_delivery_id_idx" unique="false">
            <column ascending="true" name="delivery_id"/>
         </index>
         <index name="plantings_delivery_id_species_id_planting_type_id_key" unique="true">
            <column ascending="true" name="delivery_id"/>
            <column ascending="true" name="species_id"/>
            <column ascending="true" name="planting_type_id"/>
         </index>
         <index name="plantings_species_id_idx" unique="false">
            <column ascending="true" name="species_id"/>
         </index>
         <index name="plantings_substratum_id_idx" unique="false">
            <column ascending="true" name="substratum_id"/>
         </index>
         <checkConstraint constraint="(((planting_type_id = ANY (ARRAY[2, 4])) AND (num_plants &lt; 0)) OR ((planting_type_id &lt;&gt; ALL (ARRAY[2, 4])) AND (num_plants &gt; 0)))" name="num_plants_sign_consistent_with_type"/>
         <checkConstraint constraint="(notes !~ similar_to_escape(' *'::text))" name="plantings_notes_check"/>
      </table>
      <table name="plot_t0_densities" remarks="Density for a plot per species, in plants per hectare." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="plot_t0_densities_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="species_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="plot_t0_densities_species_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="plot_density" nullable="false" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="3" name="created_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="4" name="modified_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="created_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="plot_t0_densities_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="modified_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="plot_t0_densities_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <primaryKey column="monitoring_plot_id" sequenceNumberInPK="1"/>
         <primaryKey column="species_id" sequenceNumberInPK="2"/>
         <index name="plot_t0_densities_pkey" unique="true">
            <column ascending="true" name="monitoring_plot_id"/>
            <column ascending="true" name="species_id"/>
         </index>
      </table>
      <table name="plot_t0_observations" remarks="Which observation to use to determine t0 plot density." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="plot_t0_observations_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
            <parent column="monitoring_plot_id" foreignKey="plot_t0_observations_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="observation_id" foreignKey="plot_t0_observations_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plots"/>
            <parent column="id" foreignKey="plot_t0_observations_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="2" name="created_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="3" name="modified_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="created_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="plot_t0_observations_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="modified_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="plot_t0_observations_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <primaryKey column="monitoring_plot_id" sequenceNumberInPK="1"/>
         <index name="plot_t0_observations_pkey" unique="true">
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
      </table>
      <table name="recorded_plant_statuses" remarks="(Enum) Possible statuses of a plant recorded during observation of a monitoring plot." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="status_id" foreignKey="recorded_plants_status_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="recorded_plants"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="recorded_plant_statuses_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="recorded_plant_statuses_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="recorded_plants" remarks="Information about individual plants observed in monitoring plots." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="observation_id" foreignKey="recorded_plants_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plots"/>
            <parent column="id" foreignKey="recorded_plants_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="recorded_plants_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
            <parent column="monitoring_plot_id" foreignKey="recorded_plants_observation_id_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_plots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="certainty_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="recorded_plants_certainty_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="recorded_species_certainties"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="gps_coordinates" nullable="false" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="species_id" nullable="true" remarks="If certainty is &quot;Known,&quot; the ID of the plant's species. Null for other certainty values." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="recorded_plants_species_id_fkey" implied="false" onDeleteCascade="false" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="species_name" nullable="true" remarks="If certainty is &quot;Other,&quot; the user-supplied name of the plant's species. Null for other certainty values." size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="status_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="recorded_plants_status_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="recorded_plant_statuses"/>
         </column>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="recorded_plants_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="recorded_plants_monitoring_plot_id_idx" unique="false">
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
         <index name="recorded_plants_observation_id_monitoring_plot_id_idx" unique="false">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_id"/>
         </index>
         <index name="recorded_plants_species_id_idx" unique="false">
            <column ascending="true" name="species_id"/>
         </index>
         <checkConstraint constraint="(((certainty_id = 1) AND (species_id IS NOT NULL) AND (species_name IS NULL)) OR ((certainty_id = 2) AND (species_id IS NULL)) OR ((certainty_id = 3) AND (species_id IS NULL) AND (species_name IS NULL)))" name="species_info_matches_certainty"/>
      </table>
      <table name="recorded_species_certainties" remarks="(Enum) Levels of certainty about the identity of a species recorded in a monitoring plot observation." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="certainty_id" foreignKey="observed_plot_species_totals_certainty_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observed_plot_species_totals"/>
            <child column="certainty_id" foreignKey="observed_site_species_totals_certainty_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observed_site_species_totals"/>
            <child column="certainty_id" foreignKey="observed_stratum_species_totals_certainty_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observed_stratum_species_totals"/>
            <child column="certainty_id" foreignKey="observed_substratum_species_totals_certainty_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observed_substratum_species_totals"/>
            <child column="certainty_id" foreignKey="recorded_plants_certainty_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="recorded_plants"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="recorded_species_certainties_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="recorded_species_certainties_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="recorded_trees" remarks="Recorded trees or shrubs of a biomass observation." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="observation_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="observation_id" foreignKey="recorded_trees_observation_id_biomass_species_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_species"/>
            <parent column="id" foreignKey="recorded_trees_observation_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="monitoring_plot_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="recorded_trees_monitoring_plot_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plots"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="biomass_species_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="recorded_trees_observation_id_biomass_species_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="tree_number" nullable="false" remarks="A unique incremental number per observation plot starting at 1 for accounting trees at a biomass observation." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="trunk_number" nullable="false" remarks="A unique incremental number starting at 1 for accounting trunks at a biomass observation. Defaults to 1 for Trees/Shrubs." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="tree_growth_form_id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <parent column="id" foreignKey="recorded_trees_tree_growth_form_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="tree_growth_forms"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="is_dead" nullable="false" remarks="" size="1" type="bool" typeCode="-7"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="diameter_at_breast_height_cm" nullable="true" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="point_of_measurement_m" nullable="true" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="height_m" nullable="true" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="shrub_diameter_cm" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="description" nullable="true" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="gps_coordinates" nullable="true" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="14" name="tree_crown_diameter_cm" nullable="true" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="bole_height_m" nullable="true" remarks="" size="0" type="numeric" typeCode="2"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="recorded_trees_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="recorded_trees_observation_plot_tree_trunk_key" unique="true">
            <column ascending="true" name="observation_id"/>
            <column ascending="true" name="monitoring_plot_id"/>
            <column ascending="true" name="tree_number"/>
            <column ascending="true" name="trunk_number"/>
         </index>
         <checkConstraint constraint="(((tree_growth_form_id = 1) AND (diameter_at_breast_height_cm IS NOT NULL) AND (point_of_measurement_m IS NOT NULL) AND (shrub_diameter_cm IS NULL) AND (trunk_number = 1)) OR ((tree_growth_form_id = 2) AND (bole_height_m IS NULL) AND (diameter_at_breast_height_cm IS NULL) AND (point_of_measurement_m IS NULL) AND (height_m IS NULL) AND (shrub_diameter_cm IS NOT NULL) AND (trunk_number = 1)) OR ((tree_growth_form_id = 3) AND (diameter_at_breast_height_cm IS NOT NULL) AND (point_of_measurement_m IS NOT NULL) AND (shrub_diameter_cm IS NULL)))" name="growth_form_specific_data"/>
         <checkConstraint constraint="(bole_height_m &gt;= (0)::numeric)" name="recorded_trees_bole_height_m_check"/>
         <checkConstraint constraint="(diameter_at_breast_height_cm &gt;= (0)::numeric)" name="recorded_trees_diameter_at_breast_height_cm_check"/>
         <checkConstraint constraint="(height_m &gt;= (0)::numeric)" name="recorded_trees_height_m_check"/>
         <checkConstraint constraint="(point_of_measurement_m &gt;= (0)::numeric)" name="recorded_trees_point_of_measurement_m_check"/>
         <checkConstraint constraint="(shrub_diameter_cm &gt;= 0)" name="recorded_trees_shrub_diameter_cm_check"/>
         <checkConstraint constraint="(tree_number &gt;= 1)" name="recorded_trees_tree_number_check"/>
         <checkConstraint constraint="(trunk_number &gt;= 1)" name="recorded_trees_trunk_number_check"/>
         <checkConstraint constraint="(tree_crown_diameter_cm &gt;= 0)" name="tree_crown_diameter_positive"/>
         <checkConstraint constraint="((tree_growth_form_id = ANY (ARRAY[1, 3])) OR (tree_crown_diameter_cm IS NULL))" name="tree_crown_diameter_requires_tree"/>
      </table>
      <table name="scheduled_planting_date_species" remarks="Species and substratum quantities planned for a scheduled planting date." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="scheduled_planting_date_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="scheduled_planting_date_species_scheduled_planting_date_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="scheduled_planting_dates"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="substratum_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="scheduled_planting_date_species_substratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="species_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="scheduled_planting_date_species_species_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="quantity" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <primaryKey column="scheduled_planting_date_id" sequenceNumberInPK="1"/>
         <primaryKey column="substratum_id" sequenceNumberInPK="2"/>
         <primaryKey column="species_id" sequenceNumberInPK="3"/>
         <index name="scheduled_planting_date_species_pkey" unique="true">
            <column ascending="true" name="scheduled_planting_date_id"/>
            <column ascending="true" name="substratum_id"/>
            <column ascending="true" name="species_id"/>
         </index>
         <index name="scheduled_planting_date_species_species_id_idx" unique="false">
            <column ascending="true" name="species_id"/>
         </index>
         <index name="scheduled_planting_date_species_substratum_id_idx" unique="false">
            <column ascending="true" name="substratum_id"/>
         </index>
         <checkConstraint constraint="(quantity &gt;= 0)" name="scheduled_planting_date_species_quantity_check"/>
      </table>
      <table name="scheduled_planting_dates" remarks="Planned planting dates within a planting season." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="scheduled_planting_date_id" foreignKey="planting_date_requests_scheduled_planting_date_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_date_requests"/>
            <child column="scheduled_planting_date_id" foreignKey="scheduled_planting_date_species_scheduled_planting_date_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="scheduled_planting_date_species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="planting_season_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="scheduled_planting_dates_planting_season_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_seasons"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="date" nullable="false" remarks="" size="13" type="date" typeCode="91"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="created_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="scheduled_planting_dates_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="4" name="created_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="modified_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="scheduled_planting_dates_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="6" name="modified_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="scheduled_planting_dates_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="scheduled_planting_dates_planting_season_id_date_key" unique="true">
            <column ascending="true" name="planting_season_id"/>
            <column ascending="true" name="date"/>
         </index>
         <index name="scheduled_planting_dates_planting_season_id_idx" unique="false">
            <column ascending="true" name="planting_season_id"/>
         </index>
      </table>
      <table name="simplified_planting_site_histories" remarks="Simplified boundary geometries for planting site versions." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="planting_site_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="simplified_planting_site_historie_planting_site_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_site_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="boundary" nullable="false" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="exclusion" nullable="true" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <primaryKey column="planting_site_history_id" sequenceNumberInPK="1"/>
         <index name="simplified_planting_site_histories_pkey" unique="true">
            <column ascending="true" name="planting_site_history_id"/>
         </index>
      </table>
      <table name="simplified_planting_sites" remarks="Simplified boundary geometries for planting sites." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="planting_site_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="simplified_planting_sites_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="boundary" nullable="false" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="exclusion" nullable="true" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <primaryKey column="planting_site_id" sequenceNumberInPK="1"/>
         <index name="simplified_planting_sites_pkey" unique="true">
            <column ascending="true" name="planting_site_id"/>
         </index>
      </table>
      <table name="simplified_strata" remarks="Simplified boundary geometries for strata." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="stratum_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="simplified_strata_stratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="strata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="boundary" nullable="false" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <primaryKey column="stratum_id" sequenceNumberInPK="1"/>
         <index name="simplified_strata_pkey" unique="true">
            <column ascending="true" name="stratum_id"/>
         </index>
      </table>
      <table name="simplified_stratum_histories" remarks="Simplified boundary geometries for stratum versions." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="stratum_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="simplified_stratum_histories_stratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="stratum_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="boundary" nullable="false" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <primaryKey column="stratum_history_id" sequenceNumberInPK="1"/>
         <index name="simplified_stratum_histories_pkey" unique="true">
            <column ascending="true" name="stratum_history_id"/>
         </index>
      </table>
      <table name="simplified_substrata" remarks="Simplified boundary geometries for substrata." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="substratum_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="simplified_substrata_substratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="boundary" nullable="false" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <primaryKey column="substratum_id" sequenceNumberInPK="1"/>
         <index name="simplified_substrata_pkey" unique="true">
            <column ascending="true" name="substratum_id"/>
         </index>
      </table>
      <table name="simplified_substratum_histories" remarks="Simplified boundary geometries for substratum versions." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="substratum_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="simplified_substratum_histories_substratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substratum_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="boundary" nullable="false" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <primaryKey column="substratum_history_id" sequenceNumberInPK="1"/>
         <index name="simplified_substratum_histories_pkey" unique="true">
            <column ascending="true" name="substratum_history_id"/>
         </index>
      </table>
      <table name="soil_types" remarks="(Enum) Types of soil that can be noted in observations." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="soil_type_id" foreignKey="observation_biomass_details_soil_type_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_biomass_details"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="soil_types_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="soil_types_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
      <table name="strata" remarks="Regions within planting sites that have a consistent set of conditions such that survey results from any part of the stratum can be extrapolated to the entire stratum. strata are subdivided into plots. Every stratum has at least one plot." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="stratum_id" foreignKey="observation_stratum_results_stratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_stratum_results"/>
            <child column="stratum_id" foreignKey="observed_stratum_species_totals_stratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observed_stratum_species_totals"/>
            <child column="stratum_id" foreignKey="simplified_strata_stratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="simplified_strata"/>
            <child column="stratum_id" foreignKey="stratum_histories_stratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="stratum_histories"/>
            <child column="stratum_id" foreignKey="stratum_populations_stratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="stratum_populations"/>
            <child column="stratum_id" foreignKey="stratum_species_targets_stratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="stratum_species_targets"/>
            <child column="stratum_id" foreignKey="stratum_t0_temp_densities_stratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="stratum_t0_temp_densities"/>
            <child column="stratum_id" foreignKey="substrata_stratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="planting_site_id" nullable="false" remarks="Which planting site this stratum is part of." size="19" type="int8" typeCode="-5">
            <child column="planting_site_id" foreignKey="stratum_must_be_in_site" implied="false" onDeleteCascade="true" schema="tracking" table="stratum_species_targets"/>
            <child column="planting_site_id" foreignKey="substrata_planting_site_id_stratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="substrata"/>
            <parent column="id" foreignKey="strata_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="name" nullable="false" remarks="Short name of this stratum. This is often just a single letter. Must be unique within a planting site." size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="boundary" nullable="false" remarks="Boundary of the stratum. This area is further subdivided into plots. This will typically be a single polygon but may be multiple polygons if a stratum has several disjoint areas. Coordinates always use SRID 4326 (WGS 84 latitude/longitude)." size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="created_by" nullable="false" remarks="Which user created the stratum." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="strata_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="5" name="created_time" nullable="false" remarks="When the stratum was originally created." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="modified_by" nullable="false" remarks="Which user most recently modified the stratum." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="strata_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="7" name="modified_time" nullable="false" remarks="When the stratum was most recently modified." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="8" name="plant_variance" nullable="false" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="plant_students_t" nullable="false" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="plant_error_margin" nullable="false" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="11" name="plant_num_permanent_plots" nullable="false" remarks="Number of permanent plots to assign to the next plant monitoring observation. This is typically derived from a statistical formula." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="12" name="plant_num_temporary_plots" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="area_ha" nullable="false" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="1500" digits="0" id="14" name="initial_planting_density" nullable="false" remarks="Number of plants per hectare that should be planted in the stratum initially." size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="15" name="boundary_modified_by" nullable="false" remarks="Which user most recently edited the stratum's boundary." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="strata_boundary_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="16" name="boundary_modified_time" nullable="false" remarks="When the stratum's boundary was most recently modified." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="17" name="stable_id" nullable="false" remarks="Stratum identifier that doesn't change even if the stratum is renamed or edited. Defaults to the stratum name." size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="18" name="target_plant_density" nullable="true" remarks="Number of plants per hectare that the stratum should have after planting is fully completed. This may be less than the initial planting density to account for seedlings not surviving." size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="19" name="biomass_error_margin" nullable="false" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="20" name="biomass_num_permanent_plots" nullable="false" remarks="Number of permanent plots to assign to the next biomass monitoring observation. This is typically derived from a statistical formula." size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="21" name="biomass_num_temporary_plots" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="22" name="biomass_students_t" nullable="false" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="23" name="biomass_variance" nullable="false" remarks="" size="0" type="numeric" typeCode="2"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="strata_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="strata_planting_site_id_id_key" unique="true">
            <column ascending="true" name="planting_site_id"/>
            <column ascending="true" name="id"/>
         </index>
         <index name="strata_planting_site_id_name_key" unique="true">
            <column ascending="true" name="planting_site_id"/>
            <column ascending="true" name="name"/>
         </index>
         <index name="strata_planting_site_id_stable_id_key" unique="true">
            <column ascending="true" name="planting_site_id"/>
            <column ascending="true" name="stable_id"/>
         </index>
         <checkConstraint constraint="(area_ha &gt; (0)::numeric)" name="area_positive"/>
         <checkConstraint constraint="(plant_num_permanent_plots &gt; 0)" name="must_have_permanent_clusters"/>
         <checkConstraint constraint="(plant_num_temporary_plots &gt;= 0)" name="no_negative_temporary_plots"/>
         <checkConstraint constraint="(initial_planting_density &gt; (0)::numeric)" name="positive_target_density"/>
         <checkConstraint constraint="(target_plant_density &gt; (0)::numeric)" name="target_plant_density_positive"/>
      </table>
      <table name="stratum_histories" remarks="Versions of stratum maps over time. Each time a planting site map changes, its strata' maps are inserted into this table." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="stratum_history_id" foreignKey="observation_stratum_results_stratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_stratum_results"/>
            <child column="stratum_history_id" foreignKey="observed_stratum_species_totals_stratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_stratum_species_totals"/>
            <child column="stratum_history_id" foreignKey="simplified_stratum_histories_stratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="simplified_stratum_histories"/>
            <child column="stratum_history_id" foreignKey="substratum_histories_stratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substratum_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="planting_site_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="stratum_histories_planting_site_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_site_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="stratum_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="stratum_histories_stratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="strata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="boundary" nullable="false" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="area_ha" nullable="true" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="stable_id" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="stratum_histories_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="stratum_histories_planting_site_history_id_idx" unique="false">
            <column ascending="true" name="planting_site_history_id"/>
         </index>
         <index name="stratum_histories_stratum_id_idx" unique="false">
            <column ascending="true" name="stratum_id"/>
         </index>
      </table>
      <table name="stratum_populations" remarks="Total number of plants of each species in each stratum." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="stratum_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="stratum_populations_stratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="strata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="species_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="stratum_populations_species_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="total_plants" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <primaryKey column="stratum_id" sequenceNumberInPK="1"/>
         <primaryKey column="species_id" sequenceNumberInPK="2"/>
         <index name="stratum_populations_pkey" unique="true">
            <column ascending="true" name="stratum_id"/>
            <column ascending="true" name="species_id"/>
         </index>
      </table>
      <table name="stratum_species_targets" remarks="Which species are intended to be planted in each stratum." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="planting_site_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="planting_site_id" foreignKey="species_must_be_targeted_to_site" implied="false" onDeleteCascade="true" schema="tracking" table="planting_site_species_targets"/>
            <parent column="id" foreignKey="stratum_species_targets_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
            <parent column="planting_site_id" foreignKey="stratum_must_be_in_site" implied="false" onDeleteCascade="true" schema="tracking" table="strata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="stratum_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="stratum_species_targets_stratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="strata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="species_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="species_id" foreignKey="species_must_be_targeted_to_site" implied="false" onDeleteCascade="true" schema="tracking" table="planting_site_species_targets"/>
            <parent column="id" foreignKey="stratum_species_targets_species_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="species"/>
         </column>
         <primaryKey column="planting_site_id" sequenceNumberInPK="1"/>
         <primaryKey column="stratum_id" sequenceNumberInPK="2"/>
         <primaryKey column="species_id" sequenceNumberInPK="3"/>
         <index name="stratum_species_targets_pkey" unique="true">
            <column ascending="true" name="planting_site_id"/>
            <column ascending="true" name="stratum_id"/>
            <column ascending="true" name="species_id"/>
         </index>
         <index name="stratum_species_targets_species_id_idx" unique="false">
            <column ascending="true" name="species_id"/>
         </index>
         <index name="stratum_species_targets_stratum_id_idx" unique="false">
            <column ascending="true" name="stratum_id"/>
         </index>
      </table>
      <table name="stratum_t0_temp_densities" remarks="Density for a stratum per species, in plants per hectare. Only applies to temporary plots and only if survival_rate_includes_temp_plots is set to true for the stratum's planting site." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="stratum_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="stratum_t0_temp_densities_stratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="strata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="species_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="stratum_t0_temp_densities_species_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="stratum_density" nullable="false" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="3" name="created_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="now()" digits="6" id="4" name="modified_time" nullable="false" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="created_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="stratum_t0_temp_densities_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="modified_by" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="stratum_t0_temp_densities_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <primaryKey column="stratum_id" sequenceNumberInPK="1"/>
         <primaryKey column="species_id" sequenceNumberInPK="2"/>
         <index name="stratum_t0_temp_densities_pkey" unique="true">
            <column ascending="true" name="stratum_id"/>
            <column ascending="true" name="species_id"/>
         </index>
      </table>
      <table name="substrata" remarks="Regions within strata that are a convenient size for a planting operation. Typically &lt;10Ha." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="substratum_id" foreignKey="monitoring_plot_histories_substratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="monitoring_plot_histories"/>
            <child column="substratum_id" foreignKey="monitoring_plots_substratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="monitoring_plots"/>
            <child column="substratum_id" foreignKey="observation_requested_substrata_substratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_requested_substrata"/>
            <child column="substratum_id" foreignKey="observation_substratum_results_substratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observation_substratum_results"/>
            <child column="substratum_id" foreignKey="observed_substratum_species_totals_substratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="observed_substratum_species_totals"/>
            <child column="substratum_id" foreignKey="planting_date_request_species_substratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_date_request_species"/>
            <child column="substratum_id" foreignKey="planting_season_species_targets_substratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_season_species_targets"/>
            <child column="substratum_id" foreignKey="plantings_substratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="plantings"/>
            <child column="substratum_id" foreignKey="scheduled_planting_date_species_substratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="scheduled_planting_date_species"/>
            <child column="substratum_id" foreignKey="simplified_substrata_substratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="simplified_substrata"/>
            <child column="substratum_id" foreignKey="substratum_histories_substratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="substratum_histories"/>
            <child column="substratum_id" foreignKey="substratum_populations_substratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substratum_populations"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="stratum_id" nullable="false" remarks="Which stratum this substratum is part of." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="substrata_stratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="strata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="name" nullable="false" remarks="Short name of this substratum. This is often just a single letter and number. Must be unique within a stratum." size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="full_name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="boundary" nullable="false" remarks="Boundary of the substratum. Coordinates always use SRID 4326 (WGS 84 latitude/longitude)." size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="created_by" nullable="false" remarks="Which user created the substratum." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="substrata_created_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="6" name="created_time" nullable="false" remarks="When the substratum was originally created." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="modified_by" nullable="false" remarks="Which user most recently modified the substratum." size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="substrata_modified_by_fkey" implied="false" onDeleteCascade="false" schema="public" table="users"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="6" id="8" name="modified_time" nullable="false" remarks="When the substratum was most recently modified." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="9" name="planting_site_id" nullable="false" remarks="Which planting site this substratum is part of. This is the same as the planting site ID of this substratum's stratum, but is duplicated here so it can be used as the target of a foreign key constraint." size="19" type="int8" typeCode="-5">
            <child column="planting_site_id" foreignKey="plantings_planting_site_id_substratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="plantings"/>
            <parent column="id" foreignKey="substrata_planting_site_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="planting_sites"/>
            <parent column="planting_site_id" foreignKey="substrata_planting_site_id_stratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="strata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="10" name="area_ha" nullable="false" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="11" name="planting_completed_time" nullable="true" remarks="" size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="6" id="12" name="observed_time" nullable="true" remarks="When an observation of a monitoring plot in the substratum was most recently completed." size="35" type="timestamptz" typeCode="93"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="13" name="stable_id" nullable="false" remarks="Substratum identifier that doesn't change even if the substratum is renamed or edited. Defaults to the full name." size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="substrata_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="substrata_planting_site_id_id_key" unique="true">
            <column ascending="true" name="planting_site_id"/>
            <column ascending="true" name="id"/>
         </index>
         <index name="substrata_planting_site_id_stable_id_key" unique="true">
            <column ascending="true" name="planting_site_id"/>
            <column ascending="true" name="stable_id"/>
         </index>
         <index name="substrata_stratum_id_name_key" unique="true">
            <column ascending="true" name="stratum_id"/>
            <column ascending="true" name="name"/>
         </index>
         <checkConstraint constraint="(area_ha &gt; (0)::numeric)" name="area_positive"/>
      </table>
      <table name="substratum_histories" remarks="Versions of substratum maps over time. Each time a planting site map changes, its substrata' maps are inserted into this table." schema="tracking" type="TABLE">
         <column autoUpdated="true" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <child column="substratum_history_id" foreignKey="monitoring_plot_histories_substratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="monitoring_plot_histories"/>
            <child column="depends_on_substratum_history_id" foreignKey="observation_dependent_substra_depends_on_substratum_histor_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_dependent_substrata"/>
            <child column="substratum_history_id" foreignKey="observation_dependent_substrata_substratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_dependent_substrata"/>
            <child column="substratum_history_id" foreignKey="observation_substratum_results_substratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observation_substratum_results"/>
            <child column="substratum_history_id" foreignKey="observed_substratum_species_totals_substratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="observed_substratum_species_totals"/>
            <child column="substratum_history_id" foreignKey="simplified_substratum_histories_substratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="simplified_substratum_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="stratum_history_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="substratum_histories_stratum_history_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="stratum_histories"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="substratum_id" nullable="true" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="substratum_histories_substratum_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="3" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="4" name="full_name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="5" name="boundary" nullable="false" remarks="" size="2147483647" type="geometry" typeCode="1111"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="6" name="area_ha" nullable="true" remarks="" size="0" type="numeric" typeCode="2"/>
         <column autoUpdated="false" defaultValue="null" digits="0" id="7" name="stable_id" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="substratum_histories_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="substratum_histories_stratum_history_id_idx" unique="false">
            <column ascending="true" name="stratum_history_id"/>
         </index>
         <index name="substratum_histories_substratum_id_idx" unique="false">
            <column ascending="true" name="substratum_id"/>
         </index>
      </table>
      <table name="substratum_populations" remarks="Total number of plants of each species in each substratum." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="substratum_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="substratum_populations_substratum_id_fkey" implied="false" onDeleteCascade="true" schema="tracking" table="substrata"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="species_id" nullable="false" remarks="" size="19" type="int8" typeCode="-5">
            <parent column="id" foreignKey="substratum_populations_species_id_fkey" implied="false" onDeleteCascade="true" schema="public" table="species"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="2" name="total_plants" nullable="false" remarks="" size="10" type="int4" typeCode="4"/>
         <primaryKey column="substratum_id" sequenceNumberInPK="1"/>
         <primaryKey column="species_id" sequenceNumberInPK="2"/>
         <index name="substratum_populations_pkey" unique="true">
            <column ascending="true" name="substratum_id"/>
            <column ascending="true" name="species_id"/>
         </index>
      </table>
      <table name="tree_growth_forms" remarks="(Enum) Growth form of each species in a biomass observation." schema="tracking" type="TABLE">
         <column autoUpdated="false" defaultValue="null" digits="0" id="0" name="id" nullable="false" remarks="" size="10" type="int4" typeCode="4">
            <child column="tree_growth_form_id" foreignKey="recorded_trees_tree_growth_form_id_fkey" implied="false" onDeleteCascade="false" schema="tracking" table="recorded_trees"/>
         </column>
         <column autoUpdated="false" defaultValue="null" digits="0" id="1" name="name" nullable="false" remarks="" size="2147483647" type="text" typeCode="12"/>
         <primaryKey column="id" sequenceNumberInPK="1"/>
         <index name="tree_growth_forms_pkey" unique="true">
            <column ascending="true" name="id"/>
         </index>
         <index name="tree_growth_forms_name_key" unique="true">
            <column ascending="true" name="name"/>
         </index>
      </table>
   </tables>
</database>
