<?xml version="1.0" encoding="UTF-8"?><Diagram version="1.0" type="POSTGRES" versionMajor="9" versionMinor="1" groupSchema="false" hide_inv="false">
<Table id="0" name="stoqs_activity" schema="public" database="stoqs_canon_may2015" background="16777165">
<Column id="1" name="id" type="serial" length="0" nulls="false"/>
<Column id="2" name="uuid" type="varchar" length="32" nulls="false"/>
<Column id="3" name="campaign_id" type="int4" length="0" nulls="true"/>
<Column id="4" name="platform_id" type="int4" length="0" nulls="false"/>
<Column id="5" name="name" type="varchar" length="128" nulls="false"/>
<Column id="6" name="comment" type="text" length="0" nulls="false"/>
<Column id="7" name="startdate" type="timestamptz" length="0" nulls="false"/>
<Column id="8" name="plannedstartdate" type="timestamptz" length="0" nulls="true"/>
<Column id="9" name="enddate" type="timestamptz" length="0" nulls="true"/>
<Column id="10" name="plannedenddate" type="timestamptz" length="0" nulls="true"/>
<Column id="11" name="num_measuredparameters" type="int4" length="0" nulls="true"/>
<Column id="12" name="loaded_date" type="timestamptz" length="0" nulls="true"/>
<Column id="13" name="mindepth" type="float8" length="0" nulls="true"/>
<Column id="14" name="maxdepth" type="float8" length="0" nulls="true"/>
<Column id="15" name="activitytype_id" type="int4" length="0" nulls="true"/>
<Column id="16" name="maptrack" type="geometry" length="0" nulls="true"/>
<Column id="17" name="plannedtrack" type="geometry" length="0" nulls="true"/>
<Column id="18" name="mappoint" type="geometry" length="0" nulls="true"/>
</Table>
<Table id="19" name="stoqs_activitytype" schema="public" database="stoqs_canon_may2015" background="16777165">
<Column id="20" name="id" type="serial" length="0" nulls="false"/>
<Column id="21" name="uuid" type="varchar" length="32" nulls="false"/>
<Column id="22" name="name" type="varchar" length="128" nulls="false"/>
</Table>
<Table id="23" name="stoqs_campaign" schema="public" database="stoqs_canon_may2015" background="16777165">
<Column id="24" name="id" type="serial" length="0" nulls="false"/>
<Column id="25" name="uuid" type="varchar" length="32" nulls="false"/>
<Column id="26" name="name" type="varchar" length="128" nulls="false"/>
<Column id="27" name="startdate" type="timestamptz" length="0" nulls="true"/>
<Column id="28" name="enddate" type="timestamptz" length="0" nulls="true"/>
<Column id="29" name="description" type="varchar" length="4096" nulls="true"/>
</Table>
<Table id="30" name="stoqs_instantpoint" schema="public" database="stoqs_canon_may2015" background="16777165">
<Column id="31" name="id" type="serial" length="0" nulls="false"/>
<Column id="32" name="activity_id" type="int4" length="0" nulls="false"/>
<Column id="33" name="timevalue" type="timestamptz" length="0" nulls="false"/>
</Table>
<Table id="34" name="stoqs_platform" schema="public" database="stoqs_canon_may2015" background="16777165">
<Column id="35" name="id" type="serial" length="0" nulls="false"/>
<Column id="36" name="uuid" type="varchar" length="32" nulls="false"/>
<Column id="37" name="name" type="varchar" length="128" nulls="false"/>
<Column id="38" name="platformtype_id" type="int4" length="0" nulls="false"/>
<Column id="39" name="color" type="varchar" length="8" nulls="true"/>
</Table>
<Table id="40" name="stoqs_platformtype" schema="public" database="stoqs_canon_may2015" background="16777165">
<Column id="41" name="id" type="serial" length="0" nulls="false"/>
<Column id="42" name="uuid" type="varchar" length="32" nulls="false"/>
<Column id="43" name="name" type="varchar" length="128" nulls="false"/>
<Column id="44" name="color" type="varchar" length="8" nulls="true"/>
</Table>
<Table id="45" name="stoqs_sample" schema="public" database="stoqs_canon_may2015" background="16777165">
<Column id="46" name="id" type="serial" length="0" nulls="false"/>
<Column id="47" name="uuid" type="varchar" length="32" nulls="false"/>
<Column id="48" name="instantpoint_id" type="int4" length="0" nulls="false"/>
<Column id="49" name="depth" type="numeric" length="0" nulls="false">
<CP name="PRECISION">100</CP>
<CP name="SCALE">30</CP>
</Column>
<Column id="50" name="name" type="varchar" length="128" nulls="false"/>
<Column id="51" name="sampletype_id" type="int4" length="0" nulls="true"/>
<Column id="52" name="samplepurpose_id" type="int4" length="0" nulls="true"/>
<Column id="53" name="volume" type="float8" length="0" nulls="true"/>
<Column id="54" name="filterdiameter" type="float8" length="0" nulls="true"/>
<Column id="55" name="filterporesize" type="float8" length="0" nulls="true"/>
<Column id="56" name="laboratory" type="varchar" length="128" nulls="true"/>
<Column id="57" name="researcher" type="varchar" length="128" nulls="true"/>
<Column id="58" name="geom" type="geometry" length="0" nulls="false"/>
</Table>
<Table id="59" name="stoqs_sampletype" schema="public" database="stoqs_canon_may2015" background="16777165">
<Column id="60" name="id" type="serial" length="0" nulls="false"/>
<Column id="61" name="uuid" type="varchar" length="32" nulls="false"/>
<Column id="62" name="name" type="varchar" length="128" nulls="false"/>
</Table>
<Relation id="63" name="stoqs_activity_platform_id_fkey" cardinality="-2" identifying="false" nulls="false">
<Option name="initially" class="String" value="DEFERRED"/>
<Option name="deferrable" class="Boolean" value="true"/>
<Option name="match" class="String" value="SIMPLE"/>
<Option name="onDelete" class="String" value="NO ACTION"/>
<Option name="onUpdate" class="String" value="NO ACTION"/>
<FK>35</FK>
<PK>4</PK>
</Relation>
<Relation id="64" name="stoqs_activity_campaign_id_fkey" cardinality="-2" identifying="false" nulls="false">
<Option name="initially" class="String" value="DEFERRED"/>
<Option name="deferrable" class="Boolean" value="true"/>
<Option name="match" class="String" value="SIMPLE"/>
<Option name="onDelete" class="String" value="NO ACTION"/>
<Option name="onUpdate" class="String" value="NO ACTION"/>
<FK>24</FK>
<PK>3</PK>
</Relation>
<Relation id="65" name="stoqs_activity_activitytype_id_fkey" cardinality="-2" identifying="false" nulls="false">
<Option name="initially" class="String" value="DEFERRED"/>
<Option name="deferrable" class="Boolean" value="true"/>
<Option name="match" class="String" value="SIMPLE"/>
<Option name="onDelete" class="String" value="NO ACTION"/>
<Option name="onUpdate" class="String" value="NO ACTION"/>
<FK>20</FK>
<PK>15</PK>
</Relation>
<Relation id="66" name="stoqs_instantpoint_activity_id_fkey" cardinality="-2" identifying="false" nulls="false">
<Option name="initially" class="String" value="DEFERRED"/>
<Option name="deferrable" class="Boolean" value="true"/>
<Option name="match" class="String" value="SIMPLE"/>
<Option name="onDelete" class="String" value="NO ACTION"/>
<Option name="onUpdate" class="String" value="NO ACTION"/>
<FK>1</FK>
<PK>32</PK>
</Relation>
<Relation id="67" name="stoqs_platform_platformtype_id_fkey" cardinality="-2" identifying="false" nulls="false">
<Option name="initially" class="String" value="DEFERRED"/>
<Option name="deferrable" class="Boolean" value="true"/>
<Option name="match" class="String" value="SIMPLE"/>
<Option name="onDelete" class="String" value="NO ACTION"/>
<Option name="onUpdate" class="String" value="NO ACTION"/>
<FK>41</FK>
<PK>38</PK>
</Relation>
<Relation id="68" name="stoqs_sample_sampletype_id_fkey" cardinality="-2" identifying="false" nulls="false">
<Option name="initially" class="String" value="DEFERRED"/>
<Option name="deferrable" class="Boolean" value="true"/>
<Option name="match" class="String" value="SIMPLE"/>
<Option name="onDelete" class="String" value="NO ACTION"/>
<Option name="onUpdate" class="String" value="NO ACTION"/>
<FK>60</FK>
<PK>51</PK>
</Relation>
<Relation id="69" name="stoqs_sample_instantpoint_id_fkey" cardinality="-2" identifying="false" nulls="false">
<Option name="initially" class="String" value="DEFERRED"/>
<Option name="deferrable" class="Boolean" value="true"/>
<Option name="match" class="String" value="SIMPLE"/>
<Option name="onDelete" class="String" value="NO ACTION"/>
<Option name="onUpdate" class="String" value="NO ACTION"/>
<FK>31</FK>
<PK>48</PK>
</Relation>
<Index table="0" name="stoqs_activity_maptrack_id" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="16" sequence="0" ascending="true"/>
</Index>
<Index table="0" name="stoqs_activity_plannedtrack_id" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="17" sequence="0" ascending="true"/>
</Index>
<Index table="0" name="stoqs_activity_activitytype_id" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="15" sequence="0" ascending="true"/>
</Index>
<Index table="0" name="stoqs_activity_platform_id" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="4" sequence="0" ascending="true"/>
</Index>
<Index table="0" name="stoqs_activity_campaign_id" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="3" sequence="0" ascending="true"/>
</Index>
<Index table="0" name="stoqs_activity_mappoint_id" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="18" sequence="0" ascending="true"/>
</Index>
<Index table="19" name="stoqs_activitytype_name_key" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="true"/>
<IndexColumn id="22" sequence="0" ascending="true"/>
</Index>
<Index table="23" name="stoqs_campaign_name" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="26" sequence="0" ascending="true"/>
</Index>
<Index table="23" name="stoqs_campaign_name_like" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="26" sequence="0" ascending="true"/>
</Index>
<Index table="30" name="stoqs_instantpoint_activity_id" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="32" sequence="0" ascending="true"/>
</Index>
<Index table="30" name="stoqs_instantpoint_timevalue" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="33" sequence="0" ascending="true"/>
</Index>
<Index table="34" name="stoqs_platform_platformtype_id" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="38" sequence="0" ascending="true"/>
</Index>
<Index table="40" name="stoqs_platformtype_name_key" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="true"/>
<IndexColumn id="43" sequence="0" ascending="true"/>
</Index>
<Index table="45" name="stoqs_sample_samplepurpose_id" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="52" sequence="0" ascending="true"/>
</Index>
<Index table="45" name="stoqs_sample_instantpoint_id" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="48" sequence="0" ascending="true"/>
</Index>
<Index table="45" name="stoqs_sample_depth" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="49" sequence="0" ascending="true"/>
</Index>
<Index table="45" name="stoqs_sample_geom_id" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="58" sequence="0" ascending="true"/>
</Index>
<Index table="45" name="stoqs_sample_name" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="50" sequence="0" ascending="true"/>
</Index>
<Index table="45" name="stoqs_sample_sampletype_id" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="51" sequence="0" ascending="true"/>
</Index>
<Index table="45" name="stoqs_sample_name_like" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="false"/>
<IndexColumn id="50" sequence="0" ascending="true"/>
</Index>
<Index table="59" name="stoqs_sampletype_name_key" schema="public" database="stoqs_canon_may2015">
<Option name="unique" class="Boolean" value="true"/>
<IndexColumn id="62" sequence="0" ascending="true"/>
</Index>
<Constraint table="0" name="stoqs_activity_pkey" type="PrimKey">
<Option name="tablespace" class="String" value="&lt;DEFAULT&gt;"/>
<ConstraintColumn id="1"/>
</Constraint>
<Constraint table="0" name="enforce_srid_plannedtrack" type="Check" condition="(st_srid(plannedtrack) = 4326)"/>
<Constraint table="0" name="enforce_srid_maptrack" type="Check" condition="(st_srid(maptrack) = 4326)"/>
<Constraint table="0" name="enforce_srid_mappoint" type="Check" condition="(st_srid(mappoint) = 4326)"/>
<Constraint table="0" name="enforce_geotype_plannedtrack" type="Check" condition="((geometrytype(plannedtrack) = 'LINESTRING'::text) OR (plannedtrack IS NULL))"/>
<Constraint table="0" name="enforce_geotype_maptrack" type="Check" condition="((geometrytype(maptrack) = 'LINESTRING'::text) OR (maptrack IS NULL))"/>
<Constraint table="0" name="enforce_geotype_mappoint" type="Check" condition="((geometrytype(mappoint) = 'POINT'::text) OR (mappoint IS NULL))"/>
<Constraint table="0" name="enforce_dims_plannedtrack" type="Check" condition="(st_ndims(plannedtrack) = 2)"/>
<Constraint table="0" name="enforce_dims_maptrack" type="Check" condition="(st_ndims(maptrack) = 2)"/>
<Constraint table="0" name="enforce_dims_mappoint" type="Check" condition="(st_ndims(mappoint) = 2)"/>
<Constraint table="19" name="stoqs_activitytype_pkey" type="PrimKey">
<Option name="tablespace" class="String" value="&lt;DEFAULT&gt;"/>
<ConstraintColumn id="20"/>
</Constraint>
<Constraint table="19" name="stoqs_activitytype_name_key" type="Unique">
<Option name="tablespace" class="String" value="&lt;DEFAULT&gt;"/>
<ConstraintColumn id="22"/>
</Constraint>
<Constraint table="23" name="stoqs_campaign_pkey" type="PrimKey">
<Option name="tablespace" class="String" value="&lt;DEFAULT&gt;"/>
<ConstraintColumn id="24"/>
</Constraint>
<Constraint table="30" name="stoqs_instantpoint_pkey" type="PrimKey">
<Option name="tablespace" class="String" value="&lt;DEFAULT&gt;"/>
<ConstraintColumn id="31"/>
</Constraint>
<Constraint table="34" name="stoqs_platform_pkey" type="PrimKey">
<Option name="tablespace" class="String" value="&lt;DEFAULT&gt;"/>
<ConstraintColumn id="35"/>
</Constraint>
<Constraint table="40" name="stoqs_platformtype_pkey" type="PrimKey">
<Option name="tablespace" class="String" value="&lt;DEFAULT&gt;"/>
<ConstraintColumn id="41"/>
</Constraint>
<Constraint table="40" name="stoqs_platformtype_name_key" type="Unique">
<Option name="tablespace" class="String" value="&lt;DEFAULT&gt;"/>
<ConstraintColumn id="43"/>
</Constraint>
<Constraint table="45" name="stoqs_sample_pkey" type="PrimKey">
<Option name="tablespace" class="String" value="&lt;DEFAULT&gt;"/>
<ConstraintColumn id="46"/>
</Constraint>
<Constraint table="45" name="enforce_srid_geom" type="Check" condition="(st_srid(geom) = 4326)"/>
<Constraint table="45" name="enforce_geotype_geom" type="Check" condition="((geometrytype(geom) = 'POINT'::text) OR (geom IS NULL))"/>
<Constraint table="45" name="enforce_dims_geom" type="Check" condition="(st_ndims(geom) = 2)"/>
<Constraint table="59" name="stoqs_sampletype_pkey" type="PrimKey">
<Option name="tablespace" class="String" value="&lt;DEFAULT&gt;"/>
<ConstraintColumn id="60"/>
</Constraint>
<Constraint table="59" name="stoqs_sampletype_name_key" type="Unique">
<Option name="tablespace" class="String" value="&lt;DEFAULT&gt;"/>
<ConstraintColumn id="62"/>
</Constraint>
<Sheet name="postgres on Kraken" id="70" disp_at="true" disp_ph="true" disp_co="true" disp_rn="true">
<Place id="34" visible="true">551,39,170,110</Place>
<Place id="40" visible="true">131,79,160,90</Place>
<Place id="65" visible="true">500,0,0,0</Place>
<Place id="69" visible="true">500,0,0,0</Place>
<Place id="68" visible="true">500,0,0,0</Place>
<Place id="19" visible="true">1211,269,160,80</Place>
<Place id="23" visible="true">1151,19,200,130</Place>
<Place id="0" visible="true">761,19,230,330</Place>
<Place id="67" visible="true">500,0,0,0</Place>
<Place id="30" visible="true">741,459,170,80</Place>
<Place id="59" visible="true">11,279,160,80</Place>
<Place id="66" visible="true">500,0,0,0</Place>
<Place id="45" visible="true">271,369,190,250</Place>
<Place id="63" visible="true">500,0,0,0</Place>
<Place id="64" visible="true">500,0,0,0</Place>
</Sheet>
<Settings sheet="70" zoom="1.0"/>
</Diagram>
