Project

General

Profile

« Previous | Next » 

Revision 11129

schemas/VegCore/ERD/VegCore.ERD.mwb: taxon_observation.parent: require that this is an fkey to another taxon_observation, since this stores the taxon_observation of the same taxon_occurrence in the parent sampling_event

View differences:

schemas/VegCore/ERD/document.mwb.xml
3057 3057
                      <value type="string" key="oldName">id</value>
3058 3058
                      <link type="object" struct-name="GrtObject" key="owner">16537a20-a7a7-11e2-8ba6-080027bcf912</link>
3059 3059
                    </value>
3060
                    <value type="object" struct-name="db.mysql.Column" id="e4cb86c2-29b1-11e3-a980-080027bcf912" struct-checksum="0x783b5183">
3061
                      <value type="int" key="autoIncrement">0</value>
3062
                      <value type="string" key="characterSetName"></value>
3063
                      <value _ptr_="0xbbc7478" type="list" content-type="object" content-struct-name="db.CheckConstraint" key="checks"/>
3064
                      <value type="string" key="collationName"></value>
3065
                      <value type="string" key="datatypeExplicitParams"></value>
3066
                      <value type="string" key="defaultValue"></value>
3067
                      <value type="int" key="defaultValueIsNull">1</value>
3068
                      <value _ptr_="0xbae4c78" type="list" content-type="string" key="flags"/>
3069
                      <value type="int" key="isNotNull">0</value>
3070
                      <value type="int" key="length">767</value>
3071
                      <value type="int" key="precision">-1</value>
3072
                      <value type="int" key="scale">-1</value>
3073
                      <link type="object" struct-name="db.SimpleDatatype" key="simpleType">com.mysql.rdbms.mysql.datatype.varbinary</link>
3074
                      <value type="string" key="comment">contains the observation of the same taxon_occurrence in the parent sampling_event</value>
3075
                      <value type="string" key="name">parent</value>
3076
                      <value type="string" key="oldName">parent</value>
3077
                      <link type="object" struct-name="GrtObject" key="owner">16537a20-a7a7-11e2-8ba6-080027bcf912</link>
3078
                    </value>
3060 3079
                    <value type="object" struct-name="db.mysql.Column" id="db4e8bea-1dc6-11e3-838b-410b6ef2c3ca" struct-checksum="0x783b5183">
3061 3080
                      <value type="int" key="autoIncrement">0</value>
3062 3081
                      <value type="string" key="characterSetName"></value>
......
3236 3255
                      <value type="string" key="name">taxon_observation_id_fkey1</value>
3237 3256
                      <value type="string" key="oldName">taxon_observation_id_fkey1</value>
3238 3257
                    </value>
3258
                    <value type="object" struct-name="db.mysql.ForeignKey" id="07e2f24c-1dde-11e3-bd5f-080027bcf912" struct-checksum="0x70a8fc40">
3259
                      <link type="object" struct-name="db.mysql.Table" key="referencedTable">7f176964-f6c0-11e2-af44-080027bcf912</link>
3260
                      <value _ptr_="0x9de3110" type="list" content-type="object" content-struct-name="db.Column" key="columns">
3261
                        <link type="object">07e2f45e-1dde-11e3-bd5f-080027bcf912</link>
3262
                      </value>
3263
                      <value type="int" key="deferability">0</value>
3264
                      <value type="string" key="deleteRule">CASCADE</value>
3265
                      <link type="object" struct-name="db.Index" key="index">07e3e7c4-1dde-11e3-bd5f-080027bcf912</link>
3266
                      <value type="int" key="mandatory">1</value>
3267
                      <value type="int" key="many">1</value>
3268
                      <value type="int" key="modelOnly">0</value>
3269
                      <link type="object" struct-name="db.Table" key="owner">16537a20-a7a7-11e2-8ba6-080027bcf912</link>
3270
                      <value _ptr_="0x9de3498" type="list" content-type="object" content-struct-name="db.Column" key="referencedColumns">
3271
                        <link type="object">7f176d06-f6c0-11e2-af44-080027bcf912</link>
3272
                      </value>
3273
                      <value type="int" key="referencedMandatory">1</value>
3274
                      <value type="string" key="updateRule">CASCADE</value>
3275
                      <value type="string" key="comment"></value>
3276
                      <value type="string" key="name">fk_taxon_observation_taxa_sampling_event1</value>
3277
                      <value type="string" key="oldName">fk_taxon_observation_taxa_sampling_event1</value>
3278
                    </value>
3279
                    <value type="object" struct-name="db.mysql.ForeignKey" id="e4cb84c4-29b1-11e3-a980-080027bcf912" struct-checksum="0x70a8fc40">
3280
                      <link type="object" struct-name="db.mysql.Table" key="referencedTable">16537a20-a7a7-11e2-8ba6-080027bcf912</link>
3281
                      <value _ptr_="0xbb48390" type="list" content-type="object" content-struct-name="db.Column" key="columns">
3282
                        <link type="object">e4cb86c2-29b1-11e3-a980-080027bcf912</link>
3283
                      </value>
3284
                      <value type="int" key="deferability">0</value>
3285
                      <value type="string" key="deleteRule">CASCADE</value>
3286
                      <link type="object" struct-name="db.Index" key="index">e4cba2d8-29b1-11e3-a980-080027bcf912</link>
3287
                      <value type="int" key="mandatory">1</value>
3288
                      <value type="int" key="many">1</value>
3289
                      <value type="int" key="modelOnly">0</value>
3290
                      <link type="object" struct-name="db.Table" key="owner">16537a20-a7a7-11e2-8ba6-080027bcf912</link>
3291
                      <value _ptr_="0xb7b6878" type="list" content-type="object" content-struct-name="db.Column" key="referencedColumns">
3292
                        <link type="object">16537d54-a7a7-11e2-8ba6-080027bcf912</link>
3293
                      </value>
3294
                      <value type="int" key="referencedMandatory">0</value>
3295
                      <value type="string" key="updateRule">CASCADE</value>
3296
                      <value type="string" key="comment"></value>
3297
                      <value type="string" key="name">taxon_observation_id_fkey2</value>
3298
                      <value type="string" key="oldName">taxon_observation_id_fkey2</value>
3299
                    </value>
3239 3300
                    <value type="object" struct-name="db.mysql.ForeignKey" id="21b40060-f680-11e2-aebb-080027bcf912" struct-checksum="0x70a8fc40">
3240 3301
                      <link type="object" struct-name="db.mysql.Table" key="referencedTable">4001ec92-f678-11e2-9716-080027bcf912</link>
3241 3302
                      <value _ptr_="0x9de2920" type="list" content-type="object" content-struct-name="db.Column" key="columns">
......
3277 3338
                      <value type="string" key="name">fk_taxon_observation_sampling_event1</value>
3278 3339
                      <value type="string" key="oldName">fk_taxon_observation_sampling_event1</value>
3279 3340
                    </value>
3280
                    <value type="object" struct-name="db.mysql.ForeignKey" id="07e2f24c-1dde-11e3-bd5f-080027bcf912" struct-checksum="0x70a8fc40">
3281
                      <link type="object" struct-name="db.mysql.Table" key="referencedTable">7f176964-f6c0-11e2-af44-080027bcf912</link>
3282
                      <value _ptr_="0x9de3110" type="list" content-type="object" content-struct-name="db.Column" key="columns">
3283
                        <link type="object">07e2f45e-1dde-11e3-bd5f-080027bcf912</link>
3284
                      </value>
3285
                      <value type="int" key="deferability">0</value>
3286
                      <value type="string" key="deleteRule">CASCADE</value>
3287
                      <link type="object" struct-name="db.Index" key="index">07e3e7c4-1dde-11e3-bd5f-080027bcf912</link>
3288
                      <value type="int" key="mandatory">1</value>
3289
                      <value type="int" key="many">1</value>
3290
                      <value type="int" key="modelOnly">0</value>
3291
                      <link type="object" struct-name="db.Table" key="owner">16537a20-a7a7-11e2-8ba6-080027bcf912</link>
3292
                      <value _ptr_="0x9de3498" type="list" content-type="object" content-struct-name="db.Column" key="referencedColumns">
3293
                        <link type="object">7f176d06-f6c0-11e2-af44-080027bcf912</link>
3294
                      </value>
3295
                      <value type="int" key="referencedMandatory">1</value>
3296
                      <value type="string" key="updateRule">CASCADE</value>
3297
                      <value type="string" key="comment"></value>
3298
                      <value type="string" key="name">fk_taxon_observation_taxa_sampling_event1</value>
3299
                      <value type="string" key="oldName">fk_taxon_observation_taxa_sampling_event1</value>
3300
                    </value>
3301 3341
                    <value type="object" struct-name="db.mysql.ForeignKey" id="db4e8988-1dc6-11e3-838b-410b6ef2c3ca" struct-checksum="0x70a8fc40">
3302 3342
                      <link type="object" struct-name="db.mysql.Table" key="referencedTable">f9d23e32-1dc5-11e3-838b-410b6ef2c3ca</link>
3303 3343
                      <value _ptr_="0x9de3508" type="list" content-type="object" content-struct-name="db.Column" key="columns">
......
3475 3515
                      <value type="string" key="oldName">taxon_observation__unique</value>
3476 3516
                      <link type="object" struct-name="GrtObject" key="owner">16537a20-a7a7-11e2-8ba6-080027bcf912</link>
3477 3517
                    </value>
3518
                    <value type="object" struct-name="db.mysql.Index" id="e4cba2d8-29b1-11e3-a980-080027bcf912" struct-checksum="0x309b847a">
3519
                      <value _ptr_="0xc2965d8" type="list" content-type="object" content-struct-name="db.mysql.IndexColumn" key="columns">
3520
                        <value type="object" struct-name="db.mysql.IndexColumn" id="e4cba4b8-29b1-11e3-a980-080027bcf912" struct-checksum="0x62630b3c">
3521
                          <value type="int" key="columnLength">0</value>
3522
                          <value type="string" key="comment"></value>
3523
                          <value type="int" key="descend">0</value>
3524
                          <link type="object" struct-name="db.Column" key="referencedColumn">e4cb86c2-29b1-11e3-a980-080027bcf912</link>
3525
                          <value type="string" key="name"></value>
3526
                          <link type="object" struct-name="GrtObject" key="owner">e4cba2d8-29b1-11e3-a980-080027bcf912</link>
3527
                        </value>
3528
                      </value>
3529
                      <value type="string" key="indexKind"></value>
3530
                      <value type="int" key="keyBlockSize">0</value>
3531
                      <value type="string" key="withParser"></value>
3532
                      <value type="string" key="comment"></value>
3533
                      <value type="int" key="deferability">0</value>
3534
                      <value type="string" key="indexType">INDEX</value>
3535
                      <value type="int" key="isPrimary">0</value>
3536
                      <value type="string" key="name">taxon_observation_id_fkey2_idx</value>
3537
                      <value type="int" key="unique">0</value>
3538
                      <value type="string" key="oldName">taxon_observation_id_fkey2_idx</value>
3539
                      <link type="object" struct-name="GrtObject" key="owner">16537a20-a7a7-11e2-8ba6-080027bcf912</link>
3540
                    </value>
3478 3541
                  </value>
3479 3542
                  <value type="string" key="maxRows"></value>
3480 3543
                  <value type="string" key="mergeInsert"></value>
......
3506 3569
                  <value type="int" key="commentedOut">0</value>
3507 3570
                  <value type="string" key="createDate">2013-04-17 13:52</value>
3508 3571
                  <value _ptr_="0x9ddd9e0" type="dict" key="customData"/>
3509
                  <value type="string" key="lastChangeDate">2013-09-30 01:06</value>
3572
                  <value type="string" key="lastChangeDate">2013-09-30 02:24</value>
3510 3573
                  <value type="int" key="modelOnly">0</value>
3511 3574
                  <value type="string" key="name">taxon_observation</value>
3512 3575
                  <link type="object" struct-name="GrtNamedObject" key="owner">be8cb246-a6e0-11e2-95e9-080027bcf912</link>
3513 3576
                  <value type="string" key="temp_sql"></value>
3514
                  <value type="string" key="comment">= DwC.vegpath.org?Occurrence (which actually represents an *observation* of an occurrence); inherited fields: parent: contains the observation of the same taxon_occurrence in the parent sampling_event</value>
3577
                  <value type="string" key="comment">= DwC.vegpath.org?Occurrence (which actually represents an *observation* of an occurrence)</value>
3515 3578
                  <value type="string" key="oldName">taxon_observation</value>
3516 3579
                </value>
3517 3580
                <value type="object" struct-name="db.mysql.Table" id="be8f1784-a6e0-11e2-95e9-080027bcf912" struct-checksum="0x1a403946">
......
10993 11056
                      <link type="object" struct-name="db.SimpleDatatype" key="simpleType">com.mysql.rdbms.mysql.datatype.varbinary</link>
10994 11057
                      <value type="string" key="comment">the parent plot</value>
10995 11058
                      <value type="string" key="name">parent</value>
10996
                      <value type="string" key="oldName">parent_plot</value>
11059
                      <value type="string" key="oldName">parent</value>
10997 11060
                      <link type="object" struct-name="GrtObject" key="owner">2673b9ee-f9bc-11e2-a599-080027bcf912</link>
10998 11061
                    </value>
10999 11062
                  </value>
......
13870 13933
                <value type="real" key="extraCaptionXOffs">0.e+00</value>
13871 13934
                <value type="real" key="extraCaptionYOffs">0.e+00</value>
13872 13935
                <link type="object" struct-name="db.ForeignKey" key="foreignKey">be8e8fe4-a6e0-11e2-95e9-080027bcf912</link>
13873
                <value type="real" key="middleSegmentOffset">6.007780790614521038150996901094913482666015625e+01</value>
13936
                <value type="real" key="middleSegmentOffset">4.400111543219503573709516786038875579833984375e+01</value>
13874 13937
                <value type="real" key="startCaptionXOffs">0.e+00</value>
13875 13938
                <value type="real" key="startCaptionYOffs">0.e+00</value>
13876 13939
                <value type="int" key="drawSplit">0</value>
......
15403 15466
                <value type="real" key="extraCaptionXOffs">0.e+00</value>
15404 15467
                <value type="real" key="extraCaptionYOffs">0.e+00</value>
15405 15468
                <link type="object" struct-name="db.ForeignKey" key="foreignKey">07e2f24c-1dde-11e3-bd5f-080027bcf912</link>
15406
                <value type="real" key="middleSegmentOffset">-4.061325955806017873328528366982936859130859375e+01</value>
15469
                <value type="real" key="middleSegmentOffset">-5.14591487172582446874002926051616668701171875e+01</value>
15407 15470
                <value type="real" key="startCaptionXOffs">0.e+00</value>
15408 15471
                <value type="real" key="startCaptionYOffs">0.e+00</value>
15409 15472
                <value type="int" key="drawSplit">0</value>
......
15854 15917
                <value type="int" key="visible">1</value>
15855 15918
                <value type="string" key="name"></value>
15856 15919
              </value>
15920
              <value type="object" struct-name="workbench.physical.Connection" id="e4cbabac-29b1-11e3-a980-080027bcf912" struct-checksum="0x9baebc92">
15921
                <value type="string" key="caption">taxon_observation_id_fkey2</value>
15922
                <value type="real" key="captionXOffs">0.e+00</value>
15923
                <value type="real" key="captionYOffs">0.e+00</value>
15924
                <value type="string" key="comment"></value>
15925
                <value type="real" key="endCaptionXOffs">0.e+00</value>
15926
                <value type="real" key="endCaptionYOffs">0.e+00</value>
15927
                <value type="string" key="extraCaption"></value>
15928
                <value type="real" key="extraCaptionXOffs">0.e+00</value>
15929
                <value type="real" key="extraCaptionYOffs">0.e+00</value>
15930
                <link type="object" struct-name="db.ForeignKey" key="foreignKey">e4cb84c4-29b1-11e3-a980-080027bcf912</link>
15931
                <value type="real" key="middleSegmentOffset">0.e+00</value>
15932
                <value type="real" key="startCaptionXOffs">0.e+00</value>
15933
                <value type="real" key="startCaptionYOffs">0.e+00</value>
15934
                <value type="int" key="drawSplit">0</value>
15935
                <link type="object" struct-name="model.Figure" key="endFigure">1653ab3a-a7a7-11e2-8ba6-080027bcf912</link>
15936
                <link type="object" struct-name="model.Figure" key="startFigure">1653ab3a-a7a7-11e2-8ba6-080027bcf912</link>
15937
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
15938
                <value type="int" key="visible">1</value>
15939
                <value type="string" key="name"></value>
15940
              </value>
15857 15941
            </value>
15858 15942
            <value type="string" key="description"></value>
15859 15943
            <value _ptr_="0xa9c9878" type="list" content-type="object" content-struct-name="model.Figure" key="figures">
......
16847 16931
                <value type="int" key="triggersExpanded">0</value>
16848 16932
                <value type="string" key="color">#FFFF00</value>
16849 16933
                <value type="int" key="expanded">1</value>
16850
                <value type="real" key="height">2.38e+02</value>
16934
                <value type="real" key="height">2.61e+02</value>
16851 16935
                <link type="object" struct-name="model.Layer" key="layer">88F9E582-B992-43CC-B7D6-A42E190DCB13</link>
16852 16936
                <value type="real" key="left">8.47e+02</value>
16853 16937
                <value type="int" key="locked">0</value>
......
17617 17701
              <value type="int" key="visible">1</value>
17618 17702
              <value type="string" key="name"></value>
17619 17703
            </value>
17620
            <value _ptr_="0xa9c9950" type="list" content-type="object" content-struct-name="model.Object" key="selection">
17621
              <link type="object">2673ee0a-f9bc-11e2-a599-080027bcf912</link>
17622
            </value>
17704
            <value _ptr_="0xa9c9950" type="list" content-type="object" content-struct-name="model.Object" key="selection"/>
17623 17705
            <value type="int" key="updateBlocked">0</value>
17624 17706
            <value type="real" key="width">1.6215e+03</value>
17625 17707
            <value type="real" key="x">0.e+00</value>
......
17632 17714
        <link type="object" struct-name="db.mgmt.Rdbms" key="rdbms">com.mysql.rdbms.mysql</link>
17633 17715
        <value _ptr_="0xa91b830" type="list" content-type="object" content-struct-name="db.Script" key="scripts"/>
17634 17716
        <value _ptr_="0x9de1448" type="dict" key="syncProfiles">
17635
          <value type="object" struct-name="db.mgmt.SyncProfile" id="e888451c-29b0-11e3-a980-080027bcf912" struct-checksum="0xc64972c2" key="">
17636
            <value _ptr_="0xb822298" type="dict" key="lastKnownDBNames">
17717
          <value type="object" struct-name="db.mgmt.SyncProfile" id="945cbdea-29b2-11e3-a980-080027bcf912" struct-checksum="0xc64972c2" key="">
17718
            <value _ptr_="0xc42dea0" type="dict" key="lastKnownDBNames">
17637 17719
              <value type="string" key="016697c0-23ec-11e3-ab7c-080027bcf912">name</value>
17638 17720
              <value type="string" key="01b2e3fe-f6ed-11e2-9cf1-080027bcf912">fk_georeferencing_party_list1</value>
17639 17721
              <value type="string" key="01b2e606-f6ed-11e2-9cf1-080027bcf912">georeferenced_by</value>
......
17810 17892
              <value type="string" key="48af0dca-a795-11e2-84c3-080027bcf912">slope_direction_deg_N</value>
17811 17893
              <value type="string" key="48c4e182-1dff-11e3-9d67-080027bcf912">event_unique_within_place</value>
17812 17894
              <value type="string" key="49a23428-f9c5-11e2-9af4-080027bcf912">fk_subplot_plot2</value>
17813
              <value type="string" key="49a235d6-f9c5-11e2-9af4-080027bcf912">parent_plot</value>
17895
              <value type="string" key="49a235d6-f9c5-11e2-9af4-080027bcf912">parent</value>
17814 17896
              <value type="string" key="49a26722-f9c5-11e2-9af4-080027bcf912">fk_subplot_plot2_idx</value>
17815 17897
              <value type="string" key="4c32a89c-a76a-11e2-92a3-080027bcf912">match_score</value>
17816 17898
              <value type="string" key="4c3ffc96-a741-11e2-9fbf-080027bcf912">taxon_string</value>
......
18152 18234
              <value type="string" key="dda7bbf8-0072-11e3-906b-080027bcf912">fk_stratum_event_sampling_event2</value>
18153 18235
              <value type="string" key="dda7bdec-0072-11e3-906b-080027bcf912">parent</value>
18154 18236
              <value type="string" key="dda7d480-0072-11e3-906b-080027bcf912">fk_stratum_event_sampling_event2_idx</value>
18237
              <value type="string" key="e4cb84c4-29b1-11e3-a980-080027bcf912">taxon_observation_id_fkey2</value>
18238
              <value type="string" key="e4cb86c2-29b1-11e3-a980-080027bcf912">parent</value>
18239
              <value type="string" key="e4cba2d8-29b1-11e3-a980-080027bcf912">taxon_observation_id_fkey2_idx</value>
18155 18240
              <value type="string" key="e95a1e48-1de9-11e3-b571-080027bcf912">fk_party_list_entry_record1</value>
18156 18241
              <value type="string" key="e96e2084-23eb-11e3-ab7c-080027bcf912">name</value>
18157 18242
              <value type="string" key="ec1f6aa2-f6c5-11e2-a35e-080027bcf912">shape</value>
......
18261 18346
    <value type="object" struct-name="app.DocumentInfo" id="BEE3982F-55A1-4B2C-914A-CD6953803AB9" struct-checksum="0xbba780b8" key="info">
18262 18347
      <value type="string" key="author">Aaron Marcuse-Kubitza</value>
18263 18348
      <value type="string" key="caption">New Model</value>
18264
      <value type="string" key="dateChanged">2013-09-30 02:21</value>
18349
      <value type="string" key="dateChanged">2013-09-30 02:27</value>
18265 18350
      <value type="string" key="dateCreated">2012-01-19 14:06</value>
18266 18351
      <value type="string" key="description"></value>
18267 18352
      <value type="string" key="project">Name of the project</value>
schemas/VegCore/VegCore.my.sql
1267 1267
/*!40101 SET character_set_client = utf8 */;
1268 1268
CREATE TABLE `taxon_observation` (
1269 1269
  `id` varbinary(767) NOT NULL,
1270
  `parent` varbinary(767) DEFAULT NULL COMMENT 'contains the observation of the same taxon_occurrence in the parent sampling_event',
1270 1271
  `taxon_occurrence` varbinary(767) NOT NULL,
1271 1272
  `sampling_event` varbinary(767) NOT NULL COMMENT 'for specimens, this will have the same event information (date_range, participants, place) as the taxon_observation',
1272 1273
  `primary_collector` varbinary(767) DEFAULT NULL,
......
1281 1282
  KEY `taxon_observation_id_fkey1_idx` (`primary_collector`),
1282 1283
  KEY `fk_taxon_observation_party_list1_idx` (`all_collectors`),
1283 1284
  KEY `taxon_observation__unique` (`sampling_event`,`primary_collector`,`collector_number`),
1285
  KEY `taxon_observation_id_fkey2_idx` (`parent`),
1284 1286
  CONSTRAINT `taxon_observation_id_fkey1` FOREIGN KEY (`primary_collector`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1285 1287
  CONSTRAINT `fk_taxon_observation_taxa_sampling_event1` FOREIGN KEY (`sampling_event`) REFERENCES `taxa_sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1288
  CONSTRAINT `taxon_observation_id_fkey2` FOREIGN KEY (`parent`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1286 1289
  CONSTRAINT `fk_taxon_observation_party_list1` FOREIGN KEY (`all_collectors`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1287 1290
  CONSTRAINT `fk_taxon_observation_sampling_event1` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1288 1291
  CONSTRAINT `fk_taxon_observation_taxon_occurrence1` FOREIGN KEY (`taxon_occurrence`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1289
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='= DwC.vegpath.org?Occurrence (which actually represents an *observation* of an occurrence); inherited fields: parent: contains the observation of the same taxon_occurrence in the parent sampling_event';
1292
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='= DwC.vegpath.org?Occurrence (which actually represents an *observation* of an occurrence)';
1290 1293
/*!40101 SET character_set_client = @saved_cs_client */;
1291 1294

  
1292 1295
--
schemas/VegCore/VegCore.pg.sql
1269 1269
/*!40101 SET character_set_client = utf8 */;
1270 1270
CREATE TABLE "taxon_observation" (
1271 1271
  "id" text NOT NULL,
1272
  "parent" text DEFAULT NULL /*COMMENT 'contains the observation of the same taxon_occurrence in the parent sampling_event'*/,
1272 1273
  "taxon_occurrence" text NOT NULL,
1273 1274
  "sampling_event" text NOT NULL /*COMMENT 'for specimens, this will have the same event information (date_range, participants, place) as the taxon_observation'*/,
1274 1275
  "primary_collector" text DEFAULT NULL,
......
1283 1284
  /*KEY "taxon_observation_id_fkey1_idx" ("primary_collector")*/CHECK (true),
1284 1285
  /*KEY "fk_taxon_observation_party_list1_idx" ("all_collectors")*/CHECK (true),
1285 1286
  /*KEY "taxon_observation__unique" ("sampling_event","primary_collector","collector_number")*/CHECK (true),
1287
  /*KEY "taxon_observation_id_fkey2_idx" ("parent")*/CHECK (true),
1286 1288
  /*CONSTRAINT "taxon_observation_id_fkey1" FOREIGN KEY ("primary_collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1287 1289
  /*CONSTRAINT "fk_taxon_observation_taxa_sampling_event1" FOREIGN KEY ("sampling_event") REFERENCES "taxa_sampling_event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1290
  /*CONSTRAINT "taxon_observation_id_fkey2" FOREIGN KEY ("parent") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1288 1291
  /*CONSTRAINT "fk_taxon_observation_party_list1" FOREIGN KEY ("all_collectors") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1289 1292
  /*CONSTRAINT "fk_taxon_observation_sampling_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1290 1293
  /*CONSTRAINT "fk_taxon_observation_taxon_occurrence1" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1291
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='= DwC.vegpath.org?Occurrence (which actually represents an *observation* of an occurrence); inherited fields: parent: contains the observation of the same taxon_occurrence in the parent sampling_event'*/;
1294
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='= DwC.vegpath.org?Occurrence (which actually represents an *observation* of an occurrence)'*/;
1292 1295
/*!40101 SET character_set_client = @saved_cs_client */;
1293 1296

  
1294 1297
--

Also available in: Unified diff