Project

General

Profile

« Previous | Next » 

Revision 11216

schemas/VegCore/ERD/VegCore.ERD.mwb: place_visit.parent (inherited): added fkey constraint that this must be a place_visit. documented that this is the concurrent observation of the parent place.

View differences:

schemas/VegCore/ERD/document.mwb.xml
3172 3172
                      <value type="int" key="precision">-1</value>
3173 3173
                      <value type="int" key="scale">-1</value>
3174 3174
                      <link type="object" struct-name="db.SimpleDatatype" key="simpleType">com.mysql.rdbms.mysql.datatype.varbinary</link>
3175
                      <value type="string" key="comment">contains the observation of the same taxon_occurrence in the parent sampling_event</value>
3175
                      <value type="string" key="comment">the observation of the same taxon_occurrence in the parent sampling_event</value>
3176 3176
                      <value type="string" key="name">parent</value>
3177 3177
                      <value type="string" key="oldName">parent</value>
3178 3178
                      <link type="object" struct-name="GrtObject" key="owner">16537a20-a7a7-11e2-8ba6-080027bcf912</link>
......
3733 3733
                  <value type="int" key="commentedOut">0</value>
3734 3734
                  <value type="string" key="createDate">2013-04-17 13:52</value>
3735 3735
                  <value _ptr_="0xb9a20d8" type="dict" key="customData"/>
3736
                  <value type="string" key="lastChangeDate">2013-10-09 15:39</value>
3736
                  <value type="string" key="lastChangeDate">2013-10-09 16:49</value>
3737 3737
                  <value type="int" key="modelOnly">0</value>
3738 3738
                  <value type="string" key="name">taxon_observation</value>
3739 3739
                  <link type="object" struct-name="GrtNamedObject" key="owner">be8cb246-a6e0-11e2-95e9-080027bcf912</link>
......
8256 8256
                      <value type="string" key="oldName">id</value>
8257 8257
                      <link type="object" struct-name="GrtObject" key="owner">be8f387c-a6e0-11e2-95e9-080027bcf912</link>
8258 8258
                    </value>
8259
                    <value type="object" struct-name="db.mysql.Column" id="59b34a78-313d-11e3-aa43-080027bcf912" struct-checksum="0x783b5183">
8260
                      <value type="int" key="autoIncrement">0</value>
8261
                      <value type="string" key="characterSetName"></value>
8262
                      <value _ptr_="0xd2db500" type="list" content-type="object" content-struct-name="db.CheckConstraint" key="checks"/>
8263
                      <value type="string" key="collationName"></value>
8264
                      <value type="string" key="datatypeExplicitParams"></value>
8265
                      <value type="string" key="defaultValue"></value>
8266
                      <value type="int" key="defaultValueIsNull">1</value>
8267
                      <value _ptr_="0xc6fddc0" type="list" content-type="string" key="flags"/>
8268
                      <value type="int" key="isNotNull">0</value>
8269
                      <value type="int" key="length">767</value>
8270
                      <value type="int" key="precision">-1</value>
8271
                      <value type="int" key="scale">-1</value>
8272
                      <link type="object" struct-name="db.SimpleDatatype" key="simpleType">com.mysql.rdbms.mysql.datatype.varbinary</link>
8273
                      <value type="string" key="comment">the concurrent observation of the parent place</value>
8274
                      <value type="string" key="name">parent</value>
8275
                      <value type="string" key="oldName">parent</value>
8276
                      <link type="object" struct-name="GrtObject" key="owner">be8f387c-a6e0-11e2-95e9-080027bcf912</link>
8277
                    </value>
8259 8278
                    <value type="object" struct-name="db.mysql.Column" id="be8f3ca0-a6e0-11e2-95e9-080027bcf912" struct-checksum="0x783b5183">
8260 8279
                      <value type="int" key="autoIncrement">0</value>
8261 8280
                      <value type="string" key="characterSetName"></value>
......
8435 8454
                      <value type="string" key="name">place_observation_id_fkey1</value>
8436 8455
                      <value type="string" key="oldName">place_observation_id_fkey1</value>
8437 8456
                    </value>
8457
                    <value type="object" struct-name="db.mysql.ForeignKey" id="59b347bc-313d-11e3-aa43-080027bcf912" struct-checksum="0x70a8fc40">
8458
                      <link type="object" struct-name="db.mysql.Table" key="referencedTable">be8f387c-a6e0-11e2-95e9-080027bcf912</link>
8459
                      <value _ptr_="0xc3ad680" type="list" content-type="object" content-struct-name="db.Column" key="columns">
8460
                        <link type="object">59b34a78-313d-11e3-aa43-080027bcf912</link>
8461
                      </value>
8462
                      <value type="int" key="deferability">0</value>
8463
                      <value type="string" key="deleteRule">CASCADE</value>
8464
                      <link type="object" struct-name="db.Index" key="index">59b36d32-313d-11e3-aa43-080027bcf912</link>
8465
                      <value type="int" key="mandatory">1</value>
8466
                      <value type="int" key="many">1</value>
8467
                      <value type="int" key="modelOnly">0</value>
8468
                      <link type="object" struct-name="db.Table" key="owner">be8f387c-a6e0-11e2-95e9-080027bcf912</link>
8469
                      <value _ptr_="0xc3aeed8" type="list" content-type="object" content-struct-name="db.Column" key="referencedColumns">
8470
                        <link type="object">be8f3ade-a6e0-11e2-95e9-080027bcf912</link>
8471
                      </value>
8472
                      <value type="int" key="referencedMandatory">0</value>
8473
                      <value type="string" key="updateRule">CASCADE</value>
8474
                      <value type="string" key="comment"></value>
8475
                      <value type="string" key="name">place_visit_id_fkey1</value>
8476
                      <value type="string" key="oldName">place_visit_id_fkey1</value>
8477
                    </value>
8438 8478
                    <value type="object" struct-name="db.mysql.ForeignKey" id="be8f4e98-a6e0-11e2-95e9-080027bcf912" struct-checksum="0x70a8fc40">
8439 8479
                      <link type="object" struct-name="db.mysql.Table" key="referencedTable">be8f1784-a6e0-11e2-95e9-080027bcf912</link>
8440 8480
                      <value _ptr_="0xb9f18e0" type="list" content-type="object" content-struct-name="db.Column" key="columns">
......
8635 8675
                      <value type="string" key="oldName">place_observation_id_fkey1_idx</value>
8636 8676
                      <link type="object" struct-name="GrtObject" key="owner">be8f387c-a6e0-11e2-95e9-080027bcf912</link>
8637 8677
                    </value>
8678
                    <value type="object" struct-name="db.mysql.Index" id="59b36d32-313d-11e3-aa43-080027bcf912" struct-checksum="0x309b847a">
8679
                      <value _ptr_="0xc99da70" type="list" content-type="object" content-struct-name="db.mysql.IndexColumn" key="columns">
8680
                        <value type="object" struct-name="db.mysql.IndexColumn" id="59b36f62-313d-11e3-aa43-080027bcf912" struct-checksum="0x62630b3c">
8681
                          <value type="int" key="columnLength">0</value>
8682
                          <value type="string" key="comment"></value>
8683
                          <value type="int" key="descend">0</value>
8684
                          <link type="object" struct-name="db.Column" key="referencedColumn">59b34a78-313d-11e3-aa43-080027bcf912</link>
8685
                          <value type="string" key="name"></value>
8686
                          <link type="object" struct-name="GrtObject" key="owner">59b36d32-313d-11e3-aa43-080027bcf912</link>
8687
                        </value>
8688
                      </value>
8689
                      <value type="string" key="indexKind"></value>
8690
                      <value type="int" key="keyBlockSize">0</value>
8691
                      <value type="string" key="withParser"></value>
8692
                      <value type="string" key="comment"></value>
8693
                      <value type="int" key="deferability">0</value>
8694
                      <value type="string" key="indexType">INDEX</value>
8695
                      <value type="int" key="isPrimary">0</value>
8696
                      <value type="string" key="name">place_visit_id_fkey1_idx</value>
8697
                      <value type="int" key="unique">0</value>
8698
                      <value type="string" key="oldName">place_visit_id_fkey1_idx</value>
8699
                      <link type="object" struct-name="GrtObject" key="owner">be8f387c-a6e0-11e2-95e9-080027bcf912</link>
8700
                    </value>
8638 8701
                  </value>
8639 8702
                  <value type="string" key="maxRows"></value>
8640 8703
                  <value type="string" key="mergeInsert"></value>
......
8666 8729
                  <value type="int" key="commentedOut">0</value>
8667 8730
                  <value type="string" key="createDate">2013-04-16 14:58</value>
8668 8731
                  <value _ptr_="0xb9ee508" type="dict" key="customData"/>
8669
                  <value type="string" key="lastChangeDate">2013-10-09 16:23</value>
8732
                  <value type="string" key="lastChangeDate">2013-10-09 16:50</value>
8670 8733
                  <value type="int" key="modelOnly">0</value>
8671 8734
                  <value type="string" key="name">place_visit</value>
8672 8735
                  <link type="object" struct-name="GrtNamedObject" key="owner">be8cb246-a6e0-11e2-95e9-080027bcf912</link>
......
15884 15947
                <value type="int" key="visible">1</value>
15885 15948
                <value type="string" key="name"></value>
15886 15949
              </value>
15950
              <value type="object" struct-name="workbench.physical.Connection" id="59b3780e-313d-11e3-aa43-080027bcf912" struct-checksum="0x9baebc92">
15951
                <value type="string" key="caption">place_visit_id_fkey1</value>
15952
                <value type="real" key="captionXOffs">0.e+00</value>
15953
                <value type="real" key="captionYOffs">0.e+00</value>
15954
                <value type="string" key="comment"></value>
15955
                <value type="real" key="endCaptionXOffs">0.e+00</value>
15956
                <value type="real" key="endCaptionYOffs">0.e+00</value>
15957
                <value type="string" key="extraCaption"></value>
15958
                <value type="real" key="extraCaptionXOffs">0.e+00</value>
15959
                <value type="real" key="extraCaptionYOffs">0.e+00</value>
15960
                <link type="object" struct-name="db.ForeignKey" key="foreignKey">59b347bc-313d-11e3-aa43-080027bcf912</link>
15961
                <value type="real" key="middleSegmentOffset">0.e+00</value>
15962
                <value type="real" key="startCaptionXOffs">0.e+00</value>
15963
                <value type="real" key="startCaptionYOffs">0.e+00</value>
15964
                <value type="int" key="drawSplit">0</value>
15965
                <link type="object" struct-name="model.Figure" key="endFigure">FF3A48D7-490E-4E77-B97B-1F51BF51FA8A</link>
15966
                <link type="object" struct-name="model.Figure" key="startFigure">FF3A48D7-490E-4E77-B97B-1F51BF51FA8A</link>
15967
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
15968
                <value type="int" key="visible">1</value>
15969
                <value type="string" key="name"></value>
15970
              </value>
15887 15971
            </value>
15888 15972
            <value type="string" key="description"></value>
15889 15973
            <value _ptr_="0xba36450" type="list" content-type="object" content-struct-name="model.Figure" key="figures">
......
16056 16140
                <value type="real" key="left">6.96e+02</value>
16057 16141
                <value type="int" key="locked">0</value>
16058 16142
                <value type="int" key="manualSizing">0</value>
16059
                <value type="real" key="top">7.7e+02</value>
16143
                <value type="real" key="top">7.67e+02</value>
16060 16144
                <value type="real" key="width">9.3e+01</value>
16061 16145
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
16062 16146
                <value type="int" key="visible">1</value>
......
16091 16175
                <value type="int" key="triggersExpanded">0</value>
16092 16176
                <value type="string" key="color">#66ffff</value>
16093 16177
                <value type="int" key="expanded">1</value>
16094
                <value type="real" key="height">2.38e+02</value>
16178
                <value type="real" key="height">2.61e+02</value>
16095 16179
                <link type="object" struct-name="model.Layer" key="layer">88F9E582-B992-43CC-B7D6-A42E190DCB13</link>
16096 16180
                <value type="real" key="left">3.74e+02</value>
16097 16181
                <value type="int" key="locked">0</value>
......
16133 16217
                <value type="int" key="expanded">1</value>
16134 16218
                <value type="real" key="height">1.23e+02</value>
16135 16219
                <link type="object" struct-name="model.Layer" key="layer">88F9E582-B992-43CC-B7D6-A42E190DCB13</link>
16136
                <value type="real" key="left">5.55e+02</value>
16220
                <value type="real" key="left">5.43e+02</value>
16137 16221
                <value type="int" key="locked">0</value>
16138 16222
                <value type="int" key="manualSizing">0</value>
16139
                <value type="real" key="top">1.033e+03</value>
16223
                <value type="real" key="top">1.019e+03</value>
16140 16224
                <value type="real" key="width">1.45e+02</value>
16141 16225
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
16142 16226
                <value type="int" key="visible">1</value>
......
16153 16237
                <value type="int" key="expanded">1</value>
16154 16238
                <value type="real" key="height">1.e+02</value>
16155 16239
                <link type="object" struct-name="model.Layer" key="layer">88F9E582-B992-43CC-B7D6-A42E190DCB13</link>
16156
                <value type="real" key="left">4.35e+02</value>
16240
                <value type="real" key="left">4.22e+02</value>
16157 16241
                <value type="int" key="locked">0</value>
16158 16242
                <value type="int" key="manualSizing">0</value>
16159
                <value type="real" key="top">1.173e+03</value>
16243
                <value type="real" key="top">1.174e+03</value>
16160 16244
                <value type="real" key="width">1.58e+02</value>
16161 16245
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
16162 16246
                <value type="int" key="visible">1</value>
......
16173 16257
                <value type="int" key="expanded">1</value>
16174 16258
                <value type="real" key="height">1.e+02</value>
16175 16259
                <link type="object" struct-name="model.Layer" key="layer">88F9E582-B992-43CC-B7D6-A42E190DCB13</link>
16176
                <value type="real" key="left">3.04e+02</value>
16260
                <value type="real" key="left">2.97e+02</value>
16177 16261
                <value type="int" key="locked">0</value>
16178 16262
                <value type="int" key="manualSizing">0</value>
16179
                <value type="real" key="top">1.173e+03</value>
16263
                <value type="real" key="top">1.174e+03</value>
16180 16264
                <value type="real" key="width">1.14e+02</value>
16181 16265
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
16182 16266
                <value type="int" key="visible">1</value>
......
17301 17385
                <value type="real" key="left">5.67e+02</value>
17302 17386
                <value type="int" key="locked">0</value>
17303 17387
                <value type="int" key="manualSizing">0</value>
17304
                <value type="real" key="top">8.69e+02</value>
17388
                <value type="real" key="top">8.66e+02</value>
17305 17389
                <value type="real" key="width">9.4e+01</value>
17306 17390
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
17307 17391
                <value type="int" key="visible">1</value>
......
17321 17405
                <value type="real" key="left">6.88e+02</value>
17322 17406
                <value type="int" key="locked">0</value>
17323 17407
                <value type="int" key="manualSizing">0</value>
17324
                <value type="real" key="top">9.22e+02</value>
17408
                <value type="real" key="top">9.19e+02</value>
17325 17409
                <value type="real" key="width">1.09e+02</value>
17326 17410
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
17327 17411
                <value type="int" key="visible">1</value>
......
17618 17702
        <link type="object" struct-name="db.mgmt.Rdbms" key="rdbms">com.mysql.rdbms.mysql</link>
17619 17703
        <value _ptr_="0xb986d58" type="list" content-type="object" content-struct-name="db.Script" key="scripts"/>
17620 17704
        <value _ptr_="0xb1a9c10" type="dict" key="syncProfiles">
17621
          <value type="object" struct-name="db.mgmt.SyncProfile" id="f2b17a32-3139-11e3-aa43-080027bcf912" struct-checksum="0xc64972c2" key="">
17622
            <value _ptr_="0xc682418" type="dict" key="lastKnownDBNames">
17705
          <value type="object" struct-name="db.mgmt.SyncProfile" id="f84f18f6-313d-11e3-aa43-080027bcf912" struct-checksum="0xc64972c2" key="">
17706
            <value _ptr_="0xd048ec0" type="dict" key="lastKnownDBNames">
17623 17707
              <value type="string" key="016697c0-23ec-11e3-ab7c-080027bcf912">name</value>
17624 17708
              <value type="string" key="01b2e3fe-f6ed-11e2-9cf1-080027bcf912">fk_georeferencing_party_list1</value>
17625 17709
              <value type="string" key="01b2e606-f6ed-11e2-9cf1-080027bcf912">georeferenced_by</value>
......
17809 17893
              <value type="string" key="58b0d99a-ad00-11e2-b309-080027bcf912">collector_number</value>
17810 17894
              <value type="string" key="59b33ca8-f6ba-11e2-aebb-080027bcf912">taxon_absence</value>
17811 17895
              <value type="string" key="59b33fe6-f6ba-11e2-aebb-080027bcf912">id</value>
17896
              <value type="string" key="59b347bc-313d-11e3-aa43-080027bcf912">place_visit_id_fkey1</value>
17897
              <value type="string" key="59b34a78-313d-11e3-aa43-080027bcf912">parent</value>
17812 17898
              <value type="string" key="59b34b30-f6ba-11e2-aebb-080027bcf912">PRIMARY</value>
17899
              <value type="string" key="59b36d32-313d-11e3-aa43-080027bcf912">place_visit_id_fkey1_idx</value>
17813 17900
              <value type="string" key="5a0331b2-f96d-11e2-9fb4-080027bcf912">name</value>
17814 17901
              <value type="string" key="5a8a530a-1dca-11e3-b98c-080027bcf912">fk_reobservable_taxon_determination1</value>
17815 17902
              <value type="string" key="5a8a54cc-1dca-11e3-b98c-080027bcf912">orig_observation</value>
......
17900 17987
              <value type="string" key="84258ee2-3129-11e3-ac9d-080027bcf912">authors</value>
17901 17988
              <value type="string" key="8425b926-3129-11e3-ac9d-080027bcf912">traceable_id_fkey1_idx</value>
17902 17989
              <value type="string" key="8542fbb8-a793-11e2-84c3-080027bcf912">info</value>
17990
              <value type="string" key="866e037e-313c-11e3-aa43-080027bcf912">project_id_fkey1</value>
17903 17991
              <value type="string" key="86be7be2-29ad-11e3-a980-080027bcf912">id_by_source</value>
17904 17992
              <value type="string" key="86e5a7d8-23ec-11e3-ab7c-080027bcf912">organization_unique</value>
17905 17993
              <value type="string" key="873d44bc-1df1-11e3-bbb6-080027bcf912">fk_source_party1</value>
17906 17994
              <value type="string" key="873d473c-1df1-11e3-bbb6-080027bcf912">contacts</value>
17907
              <value type="string" key="8b8a694e-a792-11e2-84c3-080027bcf912">name</value>
17908 17995
              <value type="string" key="8c119224-238a-11e3-a6f3-080027bcf912">fk_party_source1</value>
17909 17996
              <value type="string" key="8cef30ce-3119-11e3-84d1-080027bcf912">data_owner</value>
17910 17997
              <value type="string" key="8cef351a-3119-11e3-84d1-080027bcf912">id</value>
......
18250 18337
    <value type="object" struct-name="app.DocumentInfo" id="BEE3982F-55A1-4B2C-914A-CD6953803AB9" struct-checksum="0xbba780b8" key="info">
18251 18338
      <value type="string" key="author">Aaron Marcuse-Kubitza</value>
18252 18339
      <value type="string" key="caption">New Model</value>
18253
      <value type="string" key="dateChanged">2013-10-09 16:45</value>
18340
      <value type="string" key="dateChanged">2013-10-09 16:53</value>
18254 18341
      <value type="string" key="dateCreated">2012-01-19 14:06</value>
18255 18342
      <value type="string" key="description"></value>
18256 18343
      <value type="string" key="project">Name of the project</value>
schemas/VegCore/VegCore.my.sql
647 647
/*!40101 SET character_set_client = utf8 */;
648 648
CREATE TABLE `place_visit` (
649 649
  `id` varbinary(767) NOT NULL,
650
  `parent` varbinary(767) DEFAULT NULL COMMENT 'the concurrent observation of the parent place',
650 651
  `subject` varbinary(767) NOT NULL,
651 652
  `project` varbinary(767) DEFAULT NULL,
652 653
  `elevation_m` double DEFAULT NULL,
......
660 661
  KEY `fk_place_observation_geological_context1_idx` (`geological_context`),
661 662
  KEY `fk_place_observation_community1_idx` (`community`),
662 663
  KEY `place_observation_id_fkey1_idx` (`project`),
664
  KEY `place_visit_id_fkey1_idx` (`parent`),
663 665
  CONSTRAINT `place_observation_id_fkey1` FOREIGN KEY (`project`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
666
  CONSTRAINT `place_visit_id_fkey1` FOREIGN KEY (`parent`) REFERENCES `place_visit` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
664 667
  CONSTRAINT `fk_place_observation_community1` FOREIGN KEY (`community`) REFERENCES `community` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
665 668
  CONSTRAINT `fk_place_observation_event1` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
666 669
  CONSTRAINT `fk_place_observation_geological_context1` FOREIGN KEY (`geological_context`) REFERENCES `geological_context` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
......
1229 1232
/*!40101 SET character_set_client = utf8 */;
1230 1233
CREATE TABLE `taxon_observation` (
1231 1234
  `id` varbinary(767) NOT NULL,
1232
  `parent` varbinary(767) DEFAULT NULL COMMENT 'contains the observation of the same taxon_occurrence in the parent sampling_event',
1235
  `parent` varbinary(767) DEFAULT NULL COMMENT 'the observation of the same taxon_occurrence in the parent sampling_event',
1233 1236
  `subject` varbinary(767) DEFAULT NULL,
1234 1237
  `taxon_occurrence` varbinary(767) NOT NULL COMMENT 'when not provided (and not fillable from another field), a taxon_occurrence will be created with the same id as the taxon_observation',
1235 1238
  `sampling_event` varbinary(767) NOT NULL COMMENT 'for specimens, this will have the same event information (date_range, participants, place) as the taxon_observation',
......
1247 1250
  KEY `taxon_observation__unique` (`sampling_event`,`primary_collector`,`collector_number`),
1248 1251
  KEY `taxon_observation_id_fkey2_idx` (`parent`),
1249 1252
  KEY `taxon_observation_id_fkey3_idx` (`subject`),
1250
  CONSTRAINT `taxon_observation_id_fkey1` FOREIGN KEY (`primary_collector`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1251
  CONSTRAINT `fk_taxon_observation_taxa_sampling_event1` FOREIGN KEY (`sampling_event`) REFERENCES `taxa_sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1252 1253
  CONSTRAINT `taxon_observation_id_fkey2` FOREIGN KEY (`parent`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1253
  CONSTRAINT `taxon_observation_id_fkey3` FOREIGN KEY (`subject`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1254 1254
  CONSTRAINT `fk_taxon_observation_party_list1` FOREIGN KEY (`all_collectors`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1255 1255
  CONSTRAINT `fk_taxon_observation_sampling_event1` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1256
  CONSTRAINT `fk_taxon_observation_taxon_occurrence1` FOREIGN KEY (`taxon_occurrence`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1256
  CONSTRAINT `fk_taxon_observation_taxa_sampling_event1` FOREIGN KEY (`sampling_event`) REFERENCES `taxa_sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1257
  CONSTRAINT `fk_taxon_observation_taxon_occurrence1` FOREIGN KEY (`taxon_occurrence`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1258
  CONSTRAINT `taxon_observation_id_fkey1` FOREIGN KEY (`primary_collector`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1259
  CONSTRAINT `taxon_observation_id_fkey3` FOREIGN KEY (`subject`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1257 1260
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='= DwC.vegpath.org?Occurrence (which actually represents an *observation* of an occurrence)';
1258 1261
/*!40101 SET character_set_client = @saved_cs_client */;
1259 1262

  
schemas/VegCore/VegCore.pg.sql
649 649
/*!40101 SET character_set_client = utf8 */;
650 650
CREATE TABLE "place_visit" (
651 651
  "id" text NOT NULL,
652
  "parent" text DEFAULT NULL /*COMMENT 'the concurrent observation of the parent place'*/,
652 653
  "subject" text NOT NULL,
653 654
  "project" text DEFAULT NULL,
654 655
  "elevation_m" double precision DEFAULT NULL,
......
662 663
  /*KEY "fk_place_observation_geological_context1_idx" ("geological_context")*/CHECK (true),
663 664
  /*KEY "fk_place_observation_community1_idx" ("community")*/CHECK (true),
664 665
  /*KEY "place_observation_id_fkey1_idx" ("project")*/CHECK (true),
666
  /*KEY "place_visit_id_fkey1_idx" ("parent")*/CHECK (true),
665 667
  /*CONSTRAINT "place_observation_id_fkey1" FOREIGN KEY ("project") REFERENCES "project" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
668
  /*CONSTRAINT "place_visit_id_fkey1" FOREIGN KEY ("parent") REFERENCES "place_visit" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
666 669
  /*CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
667 670
  /*CONSTRAINT "fk_place_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
668 671
  /*CONSTRAINT "fk_place_observation_geological_context1" FOREIGN KEY ("geological_context") REFERENCES "geological_context" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
......
1231 1234
/*!40101 SET character_set_client = utf8 */;
1232 1235
CREATE TABLE "taxon_observation" (
1233 1236
  "id" text NOT NULL,
1234
  "parent" text DEFAULT NULL /*COMMENT 'contains the observation of the same taxon_occurrence in the parent sampling_event'*/,
1237
  "parent" text DEFAULT NULL /*COMMENT 'the observation of the same taxon_occurrence in the parent sampling_event'*/,
1235 1238
  "subject" text DEFAULT NULL,
1236 1239
  "taxon_occurrence" text NOT NULL /*COMMENT 'when not provided (and not fillable from another field), a taxon_occurrence will be created with the same id as the taxon_observation'*/,
1237 1240
  "sampling_event" text NOT NULL /*COMMENT 'for specimens, this will have the same event information (date_range, participants, place) as the taxon_observation'*/,
......
1249 1252
  /*KEY "taxon_observation__unique" ("sampling_event","primary_collector","collector_number")*/CHECK (true),
1250 1253
  /*KEY "taxon_observation_id_fkey2_idx" ("parent")*/CHECK (true),
1251 1254
  /*KEY "taxon_observation_id_fkey3_idx" ("subject")*/CHECK (true),
1252
  /*CONSTRAINT "taxon_observation_id_fkey1" FOREIGN KEY ("primary_collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1253
  /*CONSTRAINT "fk_taxon_observation_taxa_sampling_event1" FOREIGN KEY ("sampling_event") REFERENCES "taxa_sampling_event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1254 1255
  /*CONSTRAINT "taxon_observation_id_fkey2" FOREIGN KEY ("parent") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1255
  /*CONSTRAINT "taxon_observation_id_fkey3" FOREIGN KEY ("subject") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1256 1256
  /*CONSTRAINT "fk_taxon_observation_party_list1" FOREIGN KEY ("all_collectors") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1257 1257
  /*CONSTRAINT "fk_taxon_observation_sampling_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1258
  /*CONSTRAINT "fk_taxon_observation_taxon_occurrence1" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1258
  /*CONSTRAINT "fk_taxon_observation_taxa_sampling_event1" FOREIGN KEY ("sampling_event") REFERENCES "taxa_sampling_event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1259
  /*CONSTRAINT "fk_taxon_observation_taxon_occurrence1" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1260
  /*CONSTRAINT "taxon_observation_id_fkey1" FOREIGN KEY ("primary_collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1261
  /*CONSTRAINT "taxon_observation_id_fkey3" FOREIGN KEY ("subject") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1259 1262
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='= DwC.vegpath.org?Occurrence (which actually represents an *observation* of an occurrence)'*/;
1260 1263
/*!40101 SET character_set_client = @saved_cs_client */;
1261 1264

  

Also available in: Unified diff