Project

General

Profile

« Previous | Next » 

Revision 10493

schemas/VegCore/VegCore.ERD.mwb: place: renamed to local_place to distinguish it from geoplace, which is not a subclass of place (it is a separate, global table, while local_place is source-specific). note that renames sometimes need to be done manually on vegbiendev, to avoid triggering a MySQL bug that blocks the new table from being created and requires the entire database to be recreated to clear the error.

View differences:

schemas/VegCore/document.mwb.xml
5420 5420
                  <value type="int" key="commentedOut">0</value>
5421 5421
                  <value type="string" key="createDate">2013-04-17 13:52</value>
5422 5422
                  <value _ptr_="0xaaefe98" type="dict" key="customData"/>
5423
                  <value type="string" key="lastChangeDate">2013-07-27 10:38</value>
5423
                  <value type="string" key="lastChangeDate">2013-07-30 15:10</value>
5424 5424
                  <value type="int" key="modelOnly">0</value>
5425
                  <value type="string" key="name">place</value>
5425
                  <value type="string" key="name">local_place</value>
5426 5426
                  <link type="object" struct-name="GrtNamedObject" key="owner">be8cb246-a6e0-11e2-95e9-080027bcf912</link>
5427 5427
                  <value type="string" key="temp_sql"></value>
5428 5428
                  <value type="string" key="comment">"A spatial region" ("DwC":http://rs.tdwg.org/dwc/terms/#dcterms:Location) or point</value>
5429
                  <value type="string" key="oldName">place</value>
5429
                  <value type="string" key="oldName">local_place</value>
5430 5430
                </value>
5431 5431
                <value type="object" struct-name="db.mysql.Table" id="be8f67e8-a6e0-11e2-95e9-080027bcf912" struct-checksum="0x1a403946">
5432 5432
                  <value type="string" key="avgRowLength"></value>
......
10127 10127
                      <value type="string" key="collationName"></value>
10128 10128
                      <value type="string" key="datatypeExplicitParams"></value>
10129 10129
                      <value type="string" key="defaultValue"></value>
10130
                      <value type="int" key="defaultValueIsNull">0</value>
10130
                      <value type="int" key="defaultValueIsNull">1</value>
10131 10131
                      <value _ptr_="0xab397a8" type="list" content-type="string" key="flags"/>
10132 10132
                      <value type="int" key="isNotNull">0</value>
10133 10133
                      <value type="int" key="length">767</value>
......
10146 10146
                      <value type="string" key="collationName"></value>
10147 10147
                      <value type="string" key="datatypeExplicitParams"></value>
10148 10148
                      <value type="string" key="defaultValue"></value>
10149
                      <value type="int" key="defaultValueIsNull">0</value>
10149
                      <value type="int" key="defaultValueIsNull">1</value>
10150 10150
                      <value _ptr_="0xab39c78" type="list" content-type="string" key="flags"/>
10151 10151
                      <value type="int" key="isNotNull">0</value>
10152 10152
                      <value type="int" key="length">767</value>
......
10231 10231
                      <value type="string" key="oldName">PRIMARY</value>
10232 10232
                      <link type="object" struct-name="GrtObject" key="owner">15161a3e-f6e2-11e2-b6d1-080027bcf912</link>
10233 10233
                    </value>
10234
                    <value type="object" struct-name="db.mysql.Index" id="15163b68-f6e2-11e2-b6d1-080027bcf912" struct-checksum="0x309b847a">
10235
                      <value _ptr_="0xab3b780" type="list" content-type="object" content-struct-name="db.mysql.IndexColumn" key="columns">
10236
                        <value type="object" struct-name="db.mysql.IndexColumn" id="15163c80-f6e2-11e2-b6d1-080027bcf912" struct-checksum="0x62630b3c">
10237
                          <value type="int" key="columnLength">0</value>
10238
                          <value type="string" key="comment"></value>
10239
                          <value type="int" key="descend">0</value>
10240
                          <link type="object" struct-name="db.Column" key="referencedColumn">15162704-f6e2-11e2-b6d1-080027bcf912</link>
10241
                          <value type="string" key="name"></value>
10242
                          <link type="object" struct-name="GrtObject" key="owner">15163b68-f6e2-11e2-b6d1-080027bcf912</link>
10243
                        </value>
10244
                        <value type="object" struct-name="db.mysql.IndexColumn" id="15163dac-f6e2-11e2-b6d1-080027bcf912" struct-checksum="0x62630b3c">
10245
                          <value type="int" key="columnLength">0</value>
10246
                          <value type="string" key="comment"></value>
10247
                          <value type="int" key="descend">0</value>
10248
                          <link type="object" struct-name="db.Column" key="referencedColumn">15162484-f6e2-11e2-b6d1-080027bcf912</link>
10249
                          <value type="string" key="name"></value>
10250
                          <link type="object" struct-name="GrtObject" key="owner">15163b68-f6e2-11e2-b6d1-080027bcf912</link>
10251
                        </value>
10252
                      </value>
10253
                      <value type="string" key="indexKind"></value>
10254
                      <value type="int" key="keyBlockSize">0</value>
10255
                      <value type="string" key="withParser"></value>
10256
                      <value type="string" key="comment"></value>
10257
                      <value type="int" key="deferability">0</value>
10258
                      <value type="string" key="indexType">UNIQUE</value>
10259
                      <value type="int" key="isPrimary">0</value>
10260
                      <value type="string" key="name">validatable_place_unique</value>
10261
                      <value type="int" key="unique">1</value>
10262
                      <value type="string" key="oldName">validatable_place_unique</value>
10263
                      <link type="object" struct-name="GrtObject" key="owner">15161a3e-f6e2-11e2-b6d1-080027bcf912</link>
10264
                    </value>
10234 10265
                    <value type="object" struct-name="db.mysql.Index" id="151635b4-f6e2-11e2-b6d1-080027bcf912" struct-checksum="0x309b847a">
10235 10266
                      <value _ptr_="0xab3a9c0" type="list" content-type="object" content-struct-name="db.mysql.IndexColumn" key="columns">
10236 10267
                        <value type="object" struct-name="db.mysql.IndexColumn" id="151636ea-f6e2-11e2-b6d1-080027bcf912" struct-checksum="0x62630b3c">
......
10277 10308
                      <value type="string" key="oldName">fk_geovalidation_coordinates1_idx</value>
10278 10309
                      <link type="object" struct-name="GrtObject" key="owner">15161a3e-f6e2-11e2-b6d1-080027bcf912</link>
10279 10310
                    </value>
10280
                    <value type="object" struct-name="db.mysql.Index" id="15163b68-f6e2-11e2-b6d1-080027bcf912" struct-checksum="0x309b847a">
10281
                      <value _ptr_="0xab3b780" type="list" content-type="object" content-struct-name="db.mysql.IndexColumn" key="columns">
10282
                        <value type="object" struct-name="db.mysql.IndexColumn" id="15163c80-f6e2-11e2-b6d1-080027bcf912" struct-checksum="0x62630b3c">
10283
                          <value type="int" key="columnLength">0</value>
10284
                          <value type="string" key="comment"></value>
10285
                          <value type="int" key="descend">0</value>
10286
                          <link type="object" struct-name="db.Column" key="referencedColumn">15162704-f6e2-11e2-b6d1-080027bcf912</link>
10287
                          <value type="string" key="name"></value>
10288
                          <link type="object" struct-name="GrtObject" key="owner">15163b68-f6e2-11e2-b6d1-080027bcf912</link>
10289
                        </value>
10290
                        <value type="object" struct-name="db.mysql.IndexColumn" id="15163dac-f6e2-11e2-b6d1-080027bcf912" struct-checksum="0x62630b3c">
10291
                          <value type="int" key="columnLength">0</value>
10292
                          <value type="string" key="comment"></value>
10293
                          <value type="int" key="descend">0</value>
10294
                          <link type="object" struct-name="db.Column" key="referencedColumn">15162484-f6e2-11e2-b6d1-080027bcf912</link>
10295
                          <value type="string" key="name"></value>
10296
                          <link type="object" struct-name="GrtObject" key="owner">15163b68-f6e2-11e2-b6d1-080027bcf912</link>
10297
                        </value>
10298
                      </value>
10299
                      <value type="string" key="indexKind"></value>
10300
                      <value type="int" key="keyBlockSize">0</value>
10301
                      <value type="string" key="withParser"></value>
10302
                      <value type="string" key="comment"></value>
10303
                      <value type="int" key="deferability">0</value>
10304
                      <value type="string" key="indexType">UNIQUE</value>
10305
                      <value type="int" key="isPrimary">0</value>
10306
                      <value type="string" key="name">validatable_place_unique</value>
10307
                      <value type="int" key="unique">1</value>
10308
                      <value type="string" key="oldName">validatable_place_unique</value>
10309
                      <link type="object" struct-name="GrtObject" key="owner">15161a3e-f6e2-11e2-b6d1-080027bcf912</link>
10310
                    </value>
10311 10311
                  </value>
10312 10312
                  <value type="string" key="maxRows"></value>
10313 10313
                  <value type="string" key="mergeInsert"></value>
......
13366 13366
                <value type="real" key="left">5.6e+02</value>
13367 13367
                <value type="int" key="locked">0</value>
13368 13368
                <value type="int" key="manualSizing">0</value>
13369
                <value type="real" key="top">4.32e+02</value>
13369
                <value type="real" key="top">4.27e+02</value>
13370 13370
                <value type="real" key="width">8.1e+01</value>
13371 13371
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
13372 13372
                <value type="int" key="visible">1</value>
......
13383 13383
                <value type="int" key="expanded">1</value>
13384 13384
                <value type="real" key="height">1.46e+02</value>
13385 13385
                <link type="object" struct-name="model.Layer" key="layer">88F9E582-B992-43CC-B7D6-A42E190DCB13</link>
13386
                <value type="real" key="left">3.66e+02</value>
13386
                <value type="real" key="left">3.54e+02</value>
13387 13387
                <value type="int" key="locked">0</value>
13388 13388
                <value type="int" key="manualSizing">0</value>
13389 13389
                <value type="real" key="top">3.53e+02</value>
13390
                <value type="real" key="width">8.e+01</value>
13390
                <value type="real" key="width">1.14e+02</value>
13391 13391
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
13392 13392
                <value type="int" key="visible">1</value>
13393
                <value type="string" key="name">place</value>
13393
                <value type="string" key="name">local_place</value>
13394 13394
              </value>
13395 13395
              <value type="object" struct-name="workbench.physical.TableFigure" id="6B49544F-8630-4930-B54B-2CD6F6C0C631" struct-checksum="0x3b14eccb">
13396 13396
                <value type="int" key="columnsExpanded">1</value>
......
13406 13406
                <value type="real" key="left">6.78e+02</value>
13407 13407
                <value type="int" key="locked">0</value>
13408 13408
                <value type="int" key="manualSizing">0</value>
13409
                <value type="real" key="top">5.09e+02</value>
13409
                <value type="real" key="top">5.04e+02</value>
13410 13410
                <value type="real" key="width">9.e+01</value>
13411 13411
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
13412 13412
                <value type="int" key="visible">1</value>
......
13466 13466
                <value type="real" key="left">5.67e+02</value>
13467 13467
                <value type="int" key="locked">0</value>
13468 13468
                <value type="int" key="manualSizing">0</value>
13469
                <value type="real" key="top">2.25e+02</value>
13469
                <value type="real" key="top">2.12e+02</value>
13470 13470
                <value type="real" key="width">1.7e+02</value>
13471 13471
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
13472 13472
                <value type="int" key="visible">1</value>
......
14589 14589
                <value type="int" key="expanded">1</value>
14590 14590
                <value type="real" key="height">1.23e+02</value>
14591 14591
                <link type="object" struct-name="model.Layer" key="layer">88F9E582-B992-43CC-B7D6-A42E190DCB13</link>
14592
                <value type="real" key="left">6.7e+02</value>
14592
                <value type="real" key="left">6.63e+02</value>
14593 14593
                <value type="int" key="locked">0</value>
14594 14594
                <value type="int" key="manualSizing">0</value>
14595
                <value type="real" key="top">3.4e+02</value>
14595
                <value type="real" key="top">3.21e+02</value>
14596 14596
                <value type="real" key="width">1.36e+02</value>
14597 14597
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
14598 14598
                <value type="int" key="visible">1</value>
......
14741 14741
              <value type="int" key="visible">1</value>
14742 14742
              <value type="string" key="name"></value>
14743 14743
            </value>
14744
            <value _ptr_="0xab48c90" type="list" content-type="object" content-struct-name="model.Object" key="selection">
14745
              <link type="object">87489D14-A806-4921-9DDF-5E3FC42EF45C</link>
14746
            </value>
14744
            <value _ptr_="0xab48c90" type="list" content-type="object" content-struct-name="model.Object" key="selection"/>
14747 14745
            <value type="int" key="updateBlocked">0</value>
14748 14746
            <value type="real" key="width">1.6215e+03</value>
14749 14747
            <value type="real" key="x">0.e+00</value>
......
14756 14754
        <link type="object" struct-name="db.mgmt.Rdbms" key="rdbms">com.mysql.rdbms.mysql</link>
14757 14755
        <value _ptr_="0xaab1d90" type="list" content-type="object" content-struct-name="db.Script" key="scripts"/>
14758 14756
        <value _ptr_="0x9d366e8" type="dict" key="syncProfiles">
14759
          <value type="object" struct-name="db.mgmt.SyncProfile" id="5142b066-f963-11e2-8597-080027bcf912" struct-checksum="0xc64972c2" key="">
14760
            <value _ptr_="0xc11fc90" type="dict" key="lastKnownDBNames">
14757
          <value type="object" struct-name="db.mgmt.SyncProfile" id="dfa68dc6-f965-11e2-8597-080027bcf912" struct-checksum="0xc64972c2" key="">
14758
            <value _ptr_="0xc62ede8" type="dict" key="lastKnownDBNames">
14761 14759
              <value type="string" key="01b2e3fe-f6ed-11e2-9cf1-080027bcf912">fk_georeferencing_party_list1</value>
14762 14760
              <value type="string" key="01b2e606-f6ed-11e2-9cf1-080027bcf912">georeferenced_by</value>
14763 14761
              <value type="string" key="01b2fe70-f6ed-11e2-9cf1-080027bcf912">fk_georeferencing_party_list1_idx</value>
......
15126 15124
              <value type="string" key="c6722da4-a7a0-11e2-b667-080027bcf912">municipality</value>
15127 15125
              <value type="string" key="c6722f2a-a7a0-11e2-b667-080027bcf912">ranks</value>
15128 15126
              <value type="string" key="c67230d8-a7a0-11e2-b667-080027bcf912">PRIMARY</value>
15129
              <value type="string" key="c6723d8a-a7a0-11e2-b667-080027bcf912">place</value>
15127
              <value type="string" key="c6723d8a-a7a0-11e2-b667-080027bcf912">local_place</value>
15130 15128
              <value type="string" key="c6724000-a7a0-11e2-b667-080027bcf912">id</value>
15131 15129
              <value type="string" key="c67241b8-a7a0-11e2-b667-080027bcf912">parent</value>
15132 15130
              <value type="string" key="c672467c-a7a0-11e2-b667-080027bcf912">locality</value>
......
15298 15296
    <value type="object" struct-name="app.DocumentInfo" id="BEE3982F-55A1-4B2C-914A-CD6953803AB9" struct-checksum="0xbba780b8" key="info">
15299 15297
      <value type="string" key="author">Aaron Marcuse-Kubitza</value>
15300 15298
      <value type="string" key="caption">New Model</value>
15301
      <value type="string" key="dateChanged">2013-07-30 14:59</value>
15299
      <value type="string" key="dateChanged">2013-07-30 15:17</value>
15302 15300
      <value type="string" key="dateCreated">2012-01-19 14:06</value>
15303 15301
      <value type="string" key="description"></value>
15304 15302
      <value type="string" key="project">Name of the project</value>
schemas/VegCore/VegCore.my.sql
145 145
  KEY `fk_event_party_list1_idx` (`participants`),
146 146
  CONSTRAINT `fk_event_party_list1` FOREIGN KEY (`participants`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
147 147
  CONSTRAINT `fk_event1` FOREIGN KEY (`parent`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
148
  CONSTRAINT `fk_event_place1` FOREIGN KEY (`place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
148
  CONSTRAINT `fk_event_place1` FOREIGN KEY (`place`) REFERENCES `local_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
149 149
  CONSTRAINT `fk_event_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
150 150
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"an action that occurs at a place and during a period of time" ("DwC":http://rs.tdwg.org/dwc/terms/#Event)';
151 151
/*!40101 SET character_set_client = @saved_cs_client */;
......
253 253
/*!40000 ALTER TABLE `geopath_scrub` ENABLE KEYS */;
254 254

  
255 255
--
256
-- Table structure for table `geoplace`
257
--
258

  
259
/*!40101 SET @saved_cs_client     = @@character_set_client */;
260
/*!40101 SET character_set_client = utf8 */;
261
CREATE TABLE `geoplace` (
262
  `id` varbinary(767) NOT NULL,
263
  `geocoords` varbinary(767) DEFAULT NULL,
264
  `geopath` varbinary(767) DEFAULT NULL,
265
  PRIMARY KEY (`id`),
266
  UNIQUE KEY `validatable_place_unique` (`geopath`,`geocoords`),
267
  KEY `fk_geovalidation_place_path1_idx` (`geopath`),
268
  KEY `fk_geovalidation_coordinates1_idx` (`geocoords`),
269
  CONSTRAINT `fk_geovalidation_place_path10` FOREIGN KEY (`geopath`) REFERENCES `geopath` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
270
  CONSTRAINT `fk_geovalidation_coordinates10` FOREIGN KEY (`geocoords`) REFERENCES `geocoords` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
271
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
272
/*!40101 SET character_set_client = @saved_cs_client */;
273

  
274
--
275
-- Dumping data for table `geoplace`
276
--
277

  
278
/*!40000 ALTER TABLE `geoplace` DISABLE KEYS */;
279
/*!40000 ALTER TABLE `geoplace` ENABLE KEYS */;
280

  
281
--
256 282
-- Table structure for table `georeferencing`
257 283
--
258 284

  
......
269 295
  KEY `fk_georeferencing_party_list1_idx` (`georeferenced_by`),
270 296
  CONSTRAINT `fk_georeferencing_geoplace1` FOREIGN KEY (`georeferenced_place`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
271 297
  CONSTRAINT `fk_georeferencing_party_list1` FOREIGN KEY (`georeferenced_by`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
272
  CONSTRAINT `fk_georef_place1` FOREIGN KEY (`input_place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
298
  CONSTRAINT `fk_georef_place1` FOREIGN KEY (`input_place`) REFERENCES `local_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
273 299
  CONSTRAINT `fk_geovalidation_record100` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
274 300
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
275 301
/*!40101 SET character_set_client = @saved_cs_client */;
......
358 384
/*!40000 ALTER TABLE `individual_observation` ENABLE KEYS */;
359 385

  
360 386
--
387
-- Table structure for table `local_place`
388
--
389

  
390
/*!40101 SET @saved_cs_client     = @@character_set_client */;
391
/*!40101 SET character_set_client = utf8 */;
392
CREATE TABLE `local_place` (
393
  `id` varbinary(767) NOT NULL,
394
  `parent` varbinary(767) NOT NULL,
395
  `geoplace` varbinary(767) DEFAULT NULL,
396
  `locality` varbinary(767) DEFAULT NULL,
397
  `coords` set('hstore') COLLATE utf8_bin DEFAULT NULL COMMENT 'for verbatim coordinates, etc.',
398
  PRIMARY KEY (`id`),
399
  KEY `fk_place1_idx` (`parent`),
400
  KEY `fk_place_geoplace1_idx` (`geoplace`),
401
  CONSTRAINT `fk_place_geoplace1` FOREIGN KEY (`geoplace`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
402
  CONSTRAINT `fk_place1` FOREIGN KEY (`parent`) REFERENCES `local_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
403
  CONSTRAINT `fk_place_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
404
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A spatial region" ("DwC":http://rs.tdwg.org/dwc/terms/#dcterms:Location) or point';
405
/*!40101 SET character_set_client = @saved_cs_client */;
406

  
407
--
408
-- Dumping data for table `local_place`
409
--
410

  
411
/*!40000 ALTER TABLE `local_place` DISABLE KEYS */;
412
/*!40000 ALTER TABLE `local_place` ENABLE KEYS */;
413

  
414
--
361 415
-- Table structure for table `method`
362 416
--
363 417

  
......
473 527
/*!40000 ALTER TABLE `party_list_entry` ENABLE KEYS */;
474 528

  
475 529
--
476
-- Table structure for table `place`
477
--
478

  
479
/*!40101 SET @saved_cs_client     = @@character_set_client */;
480
/*!40101 SET character_set_client = utf8 */;
481
CREATE TABLE `place` (
482
  `id` varbinary(767) NOT NULL,
483
  `parent` varbinary(767) NOT NULL,
484
  `geoplace` varbinary(767) DEFAULT NULL,
485
  `locality` varbinary(767) DEFAULT NULL,
486
  `coords` set('hstore') COLLATE utf8_bin DEFAULT NULL COMMENT 'for verbatim coordinates, etc.',
487
  PRIMARY KEY (`id`),
488
  KEY `fk_place1_idx` (`parent`),
489
  KEY `fk_place_geoplace1_idx` (`geoplace`),
490
  CONSTRAINT `fk_place_geoplace1` FOREIGN KEY (`geoplace`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
491
  CONSTRAINT `fk_place1` FOREIGN KEY (`parent`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
492
  CONSTRAINT `fk_place_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
493
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A spatial region" ("DwC":http://rs.tdwg.org/dwc/terms/#dcterms:Location) or point';
494
/*!40101 SET character_set_client = @saved_cs_client */;
495

  
496
--
497
-- Dumping data for table `place`
498
--
499

  
500
/*!40000 ALTER TABLE `place` DISABLE KEYS */;
501
/*!40000 ALTER TABLE `place` ENABLE KEYS */;
502

  
503
--
504 530
-- Table structure for table `place_observation`
505 531
--
506 532

  
......
519 545
  KEY `fk_place_observation_place1_idx` (`place`),
520 546
  KEY `fk_place_observation_geological_context1_idx` (`geological_context`),
521 547
  KEY `fk_place_observation_community1_idx` (`community`),
522
  CONSTRAINT `fk_place_observation_place1` FOREIGN KEY (`place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
548
  CONSTRAINT `fk_place_observation_place1` FOREIGN KEY (`place`) REFERENCES `local_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
523 549
  CONSTRAINT `fk_place_observation_geological_context1` FOREIGN KEY (`geological_context`) REFERENCES `geological_context` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
524 550
  CONSTRAINT `fk_place_observation_community1` FOREIGN KEY (`community`) REFERENCES `community` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
525 551
  CONSTRAINT `fk_place_observation_sampling_event1` FOREIGN KEY (`id`) REFERENCES `sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
......
548 574
  `footprint_geom_WKT` varbinary(767) DEFAULT NULL,
549 575
  `dimensions` set('hstore') COLLATE utf8_bin DEFAULT NULL,
550 576
  PRIMARY KEY (`id`),
551
  CONSTRAINT `fk_subplot_place1` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
577
  CONSTRAINT `fk_subplot_place1` FOREIGN KEY (`id`) REFERENCES `local_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
552 578
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
553 579
/*!40101 SET character_set_client = @saved_cs_client */;
554 580

  
......
783 809
  KEY `fk_specimen_collection2_idx` (`current_collection`),
784 810
  KEY `fk_specimen_organization3_idx` (`owner_collection`),
785 811
  KEY `fk_specimen_party_list1_idx` (`specimenholder_institutions`),
786
  CONSTRAINT `fk_specimen_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
787
  CONSTRAINT `fk_specimen_collection1` FOREIGN KEY (`orig_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
812
  CONSTRAINT `fk_specimen_organization3` FOREIGN KEY (`owner_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
813
  CONSTRAINT `fk_specimen_taxon_observation1` FOREIGN KEY (`collection_event`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
814
  CONSTRAINT `fk_specimen_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
788 815
  CONSTRAINT `fk_specimen_collection2` FOREIGN KEY (`current_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
789
  CONSTRAINT `fk_specimen_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
790
  CONSTRAINT `fk_specimen_organization3` FOREIGN KEY (`owner_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
791 816
  CONSTRAINT `fk_specimen_party_list1` FOREIGN KEY (`specimenholder_institutions`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
792
  CONSTRAINT `fk_specimen_taxon_observation1` FOREIGN KEY (`collection_event`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
817
  CONSTRAINT `fk_specimen_collection1` FOREIGN KEY (`orig_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
818
  CONSTRAINT `fk_specimen_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
793 819
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A "part of a plant" ("Wikipedia":http://en.wikipedia.org/wiki/Specimen) which was collected from it';
794 820
/*!40101 SET character_set_client = @saved_cs_client */;
795 821

  
......
1014 1040
  UNIQUE KEY `taxon_determination_unique` (`taxon_assertion`,`identified_by`),
1015 1041
  KEY `fk_taxon_occurrence_has_qualified_taxon1_idx` (`taxon_assertion`),
1016 1042
  KEY `fk_taxon_determination_party_list1_idx` (`identified_by`),
1017
  CONSTRAINT `fk_taxon_determination_taxon_observation1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1043
  CONSTRAINT `fk_taxon_occurrence_has_qualified_taxon1` FOREIGN KEY (`taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1018 1044
  CONSTRAINT `fk_taxon_determination_party_list1` FOREIGN KEY (`identified_by`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1019
  CONSTRAINT `fk_taxon_occurrence_has_qualified_taxon1` FOREIGN KEY (`taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1045
  CONSTRAINT `fk_taxon_determination_taxon_observation1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1020 1046
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An assertion that a [[VegCore#TaxonOccurrence|TaxonOccurrence]] is a particular [[VegCore#Taxon|Taxon]]';
1021 1047
/*!40101 SET character_set_client = @saved_cs_client */;
1022 1048

  
schemas/VegCore/VegCore.pg.sql
147 147
  /*KEY "fk_event_party_list1_idx" ("participants")*/CHECK (true),
148 148
  /*CONSTRAINT "fk_event_party_list1" FOREIGN KEY ("participants") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
149 149
  /*CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
150
  /*CONSTRAINT "fk_event_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
150
  /*CONSTRAINT "fk_event_place1" FOREIGN KEY ("place") REFERENCES "local_place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
151 151
  /*CONSTRAINT "fk_event_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
152 152
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"an action that occurs at a place and during a period of text/*time*/" ("DwC":http://rs.tdwg.org/dwc/terms/#Event)'*/;
153 153
/*!40101 SET character_set_client = @saved_cs_client */;
......
255 255
/*!40000 ALTER TABLE "geopath_scrub" ENABLE KEYS */;
256 256

  
257 257
--
258
-- Table structure for table "geoplace"
259
--
260

  
261
/*!40101 SET @saved_cs_client     = @@character_set_client */;
262
/*!40101 SET character_set_client = utf8 */;
263
CREATE TABLE "geoplace" (
264
  "id" text NOT NULL,
265
  "geocoords" text DEFAULT NULL,
266
  "geopath" text DEFAULT NULL,
267
  PRIMARY KEY ("id"),
268
  /*CONSTRAINT "validatable_place_unique" */UNIQUE ("geopath","geocoords"),
269
  /*KEY "fk_geovalidation_place_path1_idx" ("geopath")*/CHECK (true),
270
  /*KEY "fk_geovalidation_coordinates1_idx" ("geocoords")*/CHECK (true),
271
  /*CONSTRAINT "fk_geovalidation_place_path10" FOREIGN KEY ("geopath") REFERENCES "geopath" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
272
  /*CONSTRAINT "fk_geovalidation_coordinates10" FOREIGN KEY ("geocoords") REFERENCES "geocoords" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
273
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
274
/*!40101 SET character_set_client = @saved_cs_client */;
275

  
276
--
277
-- Dumping data for table "geoplace"
278
--
279

  
280
/*!40000 ALTER TABLE "geoplace" DISABLE KEYS */;
281
/*!40000 ALTER TABLE "geoplace" ENABLE KEYS */;
282

  
283
--
258 284
-- Table structure for table "georeferencing"
259 285
--
260 286

  
......
271 297
  /*KEY "fk_georeferencing_party_list1_idx" ("georeferenced_by")*/CHECK (true),
272 298
  /*CONSTRAINT "fk_georeferencing_geoplace1" FOREIGN KEY ("georeferenced_place") REFERENCES "geoplace" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
273 299
  /*CONSTRAINT "fk_georeferencing_party_list1" FOREIGN KEY ("georeferenced_by") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
274
  /*CONSTRAINT "fk_georef_place1" FOREIGN KEY ("input_place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
300
  /*CONSTRAINT "fk_georef_place1" FOREIGN KEY ("input_place") REFERENCES "local_place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
275 301
  /*CONSTRAINT "fk_geovalidation_record100" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
276 302
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
277 303
/*!40101 SET character_set_client = @saved_cs_client */;
......
360 386
/*!40000 ALTER TABLE "individual_observation" ENABLE KEYS */;
361 387

  
362 388
--
389
-- Table structure for table "local_place"
390
--
391

  
392
/*!40101 SET @saved_cs_client     = @@character_set_client */;
393
/*!40101 SET character_set_client = utf8 */;
394
CREATE TABLE "local_place" (
395
  "id" text NOT NULL,
396
  "parent" text NOT NULL,
397
  "geoplace" text DEFAULT NULL,
398
  "locality" text DEFAULT NULL,
399
  "coords" hstore DEFAULT NULL /*COMMENT 'for verbatim coordinates, etc.'*/,
400
  PRIMARY KEY ("id"),
401
  /*KEY "fk_place1_idx" ("parent")*/CHECK (true),
402
  /*KEY "fk_place_geoplace1_idx" ("geoplace")*/CHECK (true),
403
  /*CONSTRAINT "fk_place_geoplace1" FOREIGN KEY ("geoplace") REFERENCES "geoplace" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
404
  /*CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "local_place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
405
  /*CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
406
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A spatial region" ("DwC":http://rs.tdwg.org/dwc/terms/#dcterms:Location) or point'*/;
407
/*!40101 SET character_set_client = @saved_cs_client */;
408

  
409
--
410
-- Dumping data for table "local_place"
411
--
412

  
413
/*!40000 ALTER TABLE "local_place" DISABLE KEYS */;
414
/*!40000 ALTER TABLE "local_place" ENABLE KEYS */;
415

  
416
--
363 417
-- Table structure for table "method"
364 418
--
365 419

  
......
475 529
/*!40000 ALTER TABLE "party_list_entry" ENABLE KEYS */;
476 530

  
477 531
--
478
-- Table structure for table "place"
479
--
480

  
481
/*!40101 SET @saved_cs_client     = @@character_set_client */;
482
/*!40101 SET character_set_client = utf8 */;
483
CREATE TABLE "place" (
484
  "id" text NOT NULL,
485
  "parent" text NOT NULL,
486
  "geoplace" text DEFAULT NULL,
487
  "locality" text DEFAULT NULL,
488
  "coords" hstore DEFAULT NULL /*COMMENT 'for verbatim coordinates, etc.'*/,
489
  PRIMARY KEY ("id"),
490
  /*KEY "fk_place1_idx" ("parent")*/CHECK (true),
491
  /*KEY "fk_place_geoplace1_idx" ("geoplace")*/CHECK (true),
492
  /*CONSTRAINT "fk_place_geoplace1" FOREIGN KEY ("geoplace") REFERENCES "geoplace" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
493
  /*CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
494
  /*CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
495
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A spatial region" ("DwC":http://rs.tdwg.org/dwc/terms/#dcterms:Location) or point'*/;
496
/*!40101 SET character_set_client = @saved_cs_client */;
497

  
498
--
499
-- Dumping data for table "place"
500
--
501

  
502
/*!40000 ALTER TABLE "place" DISABLE KEYS */;
503
/*!40000 ALTER TABLE "place" ENABLE KEYS */;
504

  
505
--
506 532
-- Table structure for table "place_observation"
507 533
--
508 534

  
......
521 547
  /*KEY "fk_place_observation_place1_idx" ("place")*/CHECK (true),
522 548
  /*KEY "fk_place_observation_geological_context1_idx" ("geological_context")*/CHECK (true),
523 549
  /*KEY "fk_place_observation_community1_idx" ("community")*/CHECK (true),
524
  /*CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
550
  /*CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "local_place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
525 551
  /*CONSTRAINT "fk_place_observation_geological_context1" FOREIGN KEY ("geological_context") REFERENCES "geological_context" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
526 552
  /*CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
527 553
  /*CONSTRAINT "fk_place_observation_sampling_event1" FOREIGN KEY ("id") REFERENCES "sampling_event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
......
550 576
  "footprint_geom_WKT" text DEFAULT NULL,
551 577
  "dimensions" hstore DEFAULT NULL,
552 578
  PRIMARY KEY ("id"),
553
  /*CONSTRAINT "fk_subplot_place1" FOREIGN KEY ("id") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
579
  /*CONSTRAINT "fk_subplot_place1" FOREIGN KEY ("id") REFERENCES "local_place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
554 580
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
555 581
/*!40101 SET character_set_client = @saved_cs_client */;
556 582

  
......
785 811
  /*KEY "fk_specimen_collection2_idx" ("current_collection")*/CHECK (true),
786 812
  /*KEY "fk_specimen_organization3_idx" ("owner_collection")*/CHECK (true),
787 813
  /*KEY "fk_specimen_party_list1_idx" ("specimenholder_institutions")*/CHECK (true),
788
  /*CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "reobservable" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
789
  /*CONSTRAINT "fk_specimen_collection1" FOREIGN KEY ("orig_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
814
  /*CONSTRAINT "fk_specimen_organization3" FOREIGN KEY ("owner_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
815
  /*CONSTRAINT "fk_specimen_taxon_observation1" FOREIGN KEY ("collection_event") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
816
  /*CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
790 817
  /*CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
791
  /*CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
792
  /*CONSTRAINT "fk_specimen_organization3" FOREIGN KEY ("owner_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
793 818
  /*CONSTRAINT "fk_specimen_party_list1" FOREIGN KEY ("specimenholder_institutions") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
794
  /*CONSTRAINT "fk_specimen_taxon_observation1" FOREIGN KEY ("collection_event") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
819
  /*CONSTRAINT "fk_specimen_collection1" FOREIGN KEY ("orig_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
820
  /*CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "reobservable" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
795 821
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A "part of a plant" ("Wikipedia":http://en.wikipedia.org/wiki/Specimen) which was collected from it'*/;
796 822
/*!40101 SET character_set_client = @saved_cs_client */;
797 823

  
......
1016 1042
  /*CONSTRAINT "taxon_determination_unique" */UNIQUE ("taxon_assertion","identified_by"),
1017 1043
  /*KEY "fk_taxon_occurrence_has_qualified_taxon1_idx" ("taxon_assertion")*/CHECK (true),
1018 1044
  /*KEY "fk_taxon_determination_party_list1_idx" ("identified_by")*/CHECK (true),
1019
  /*CONSTRAINT "fk_taxon_determination_taxon_observation1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1045
  /*CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1020 1046
  /*CONSTRAINT "fk_taxon_determination_party_list1" FOREIGN KEY ("identified_by") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1021
  /*CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1047
  /*CONSTRAINT "fk_taxon_determination_taxon_observation1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1022 1048
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An assertion that a [[VegCore#TaxonOccurrence|TaxonOccurrence]] is a particular [[VegCore#Taxon|Taxon]]'*/;
1023 1049
/*!40101 SET character_set_client = @saved_cs_client */;
1024 1050

  

Also available in: Unified diff