Project

General

Profile

1
-- MySQL dump 10.13  Distrib 5.5.32, for debian-linux-gnu (x86_64)
2
--
3
-- Host: localhost    Database: VegCore
4
-- ------------------------------------------------------
5
-- Server version	5.5.32-0ubuntu0.12.04.1
6

    
7
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10
/*!40101 SET NAMES utf8 */;
11
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12
/*!40103 SET TIME_ZONE='+00:00' */;
13
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17

    
18
--
19
-- Table structure for table `aggregate_observation`
20
--
21

    
22
/*!40101 SET @saved_cs_client     = @@character_set_client */;
23
/*!40101 SET character_set_client = utf8 */;
24
CREATE TABLE `aggregate_observation` (
25
  `id` varbinary(767) NOT NULL,
26
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
27
  PRIMARY KEY (`id`),
28
  CONSTRAINT `fk_aggregate_observation_taxon_presence1` FOREIGN KEY (`id`) REFERENCES `taxon_presence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
29
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"An observation applying to all occurrences of an organism based on an aggregation factor" ("VegX":http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/aggregateOrganismObservations/aggregateOrganismObservation)';
30
/*!40101 SET character_set_client = @saved_cs_client */;
31

    
32
--
33
-- Dumping data for table `aggregate_observation`
34
--
35

    
36
/*!40000 ALTER TABLE `aggregate_observation` DISABLE KEYS */;
37
/*!40000 ALTER TABLE `aggregate_observation` ENABLE KEYS */;
38

    
39
--
40
-- Table structure for table `base_class`
41
--
42

    
43
/*!40101 SET @saved_cs_client     = @@character_set_client */;
44
/*!40101 SET character_set_client = utf8 */;
45
CREATE TABLE `base_class` (
46
  `id` varbinary(767) NOT NULL,
47
  `referenced_class` varbinary(767) NOT NULL,
48
  PRIMARY KEY (`id`),
49
  KEY `fk_base_class_referenced_class1_idx` (`referenced_class`),
50
  CONSTRAINT `fk_base_class_referenced_class1` FOREIGN KEY (`referenced_class`) REFERENCES `referenced_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
51
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
52
/*!40101 SET character_set_client = @saved_cs_client */;
53

    
54
--
55
-- Dumping data for table `base_class`
56
--
57

    
58
/*!40000 ALTER TABLE `base_class` DISABLE KEYS */;
59
/*!40000 ALTER TABLE `base_class` ENABLE KEYS */;
60

    
61
--
62
-- Table structure for table `collection`
63
--
64

    
65
/*!40101 SET @saved_cs_client     = @@character_set_client */;
66
/*!40101 SET character_set_client = utf8 */;
67
CREATE TABLE `collection` (
68
  `id` varbinary(767) NOT NULL,
69
  `institution` varbinary(767) NOT NULL,
70
  `name` varbinary(767) NOT NULL,
71
  PRIMARY KEY (`id`),
72
  UNIQUE KEY `collection_unique` (`institution`,`name`),
73
  KEY `fk_collection_organization1_idx` (`institution`),
74
  KEY `fk_collection_source1_idx` (`id`),
75
  CONSTRAINT `fk_collection_source1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
76
  CONSTRAINT `fk_collection_organization1` FOREIGN KEY (`institution`) REFERENCES `organization` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
77
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"the collection within the institution where a specimen is held" ("Brad Boyle":https://projects.nceas.ucsb.edu/nceas/attachments/download/621/vegbien_identifier_examples.xlsx#terms/collectionCode)';
78
/*!40101 SET character_set_client = @saved_cs_client */;
79

    
80
--
81
-- Dumping data for table `collection`
82
--
83

    
84
/*!40000 ALTER TABLE `collection` DISABLE KEYS */;
85
/*!40000 ALTER TABLE `collection` ENABLE KEYS */;
86

    
87
--
88
-- Table structure for table `community`
89
--
90

    
91
/*!40101 SET @saved_cs_client     = @@character_set_client */;
92
/*!40101 SET character_set_client = utf8 */;
93
CREATE TABLE `community` (
94
  `id` varbinary(767) NOT NULL,
95
  `name` varbinary(767) NOT NULL,
96
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
97
  PRIMARY KEY (`id`),
98
  CONSTRAINT `fk_community_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
99
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A community type is an abstract grouping of organisms that tend to co-occur on the landscape due to shared ecological requirements or preferences. May be designated by syntaxon or physiognomic types." ([[VegCore#VegX|VegX]])';
100
/*!40101 SET character_set_client = @saved_cs_client */;
101

    
102
--
103
-- Dumping data for table `community`
104
--
105

    
106
/*!40000 ALTER TABLE `community` DISABLE KEYS */;
107
/*!40000 ALTER TABLE `community` ENABLE KEYS */;
108

    
109
--
110
-- Table structure for table `derived_class`
111
--
112

    
113
/*!40101 SET @saved_cs_client     = @@character_set_client */;
114
/*!40101 SET character_set_client = utf8 */;
115
CREATE TABLE `derived_class` (
116
  `id` varbinary(767) NOT NULL,
117
  PRIMARY KEY (`id`),
118
  CONSTRAINT `fk_derived_class_base_class1` FOREIGN KEY (`id`) REFERENCES `base_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
119
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
120
/*!40101 SET character_set_client = @saved_cs_client */;
121

    
122
--
123
-- Dumping data for table `derived_class`
124
--
125

    
126
/*!40000 ALTER TABLE `derived_class` DISABLE KEYS */;
127
/*!40000 ALTER TABLE `derived_class` ENABLE KEYS */;
128

    
129
--
130
-- Table structure for table `event`
131
--
132

    
133
/*!40101 SET @saved_cs_client     = @@character_set_client */;
134
/*!40101 SET character_set_client = utf8 */;
135
CREATE TABLE `event` (
136
  `id` varbinary(767) NOT NULL,
137
  `parent` varbinary(767) NOT NULL,
138
  `name` varbinary(767) DEFAULT NULL,
139
  `date_range` varbinary(767) DEFAULT NULL,
140
  `place` varbinary(767) DEFAULT NULL,
141
  `participants` varbinary(767) DEFAULT NULL,
142
  PRIMARY KEY (`id`),
143
  KEY `fk_event_place1_idx` (`place`),
144
  KEY `fk_event1_idx` (`parent`),
145
  KEY `fk_event_party_list1_idx` (`participants`),
146
  CONSTRAINT `fk_event_party_list1` FOREIGN KEY (`participants`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
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,
149
  CONSTRAINT `fk_event_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
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
/*!40101 SET character_set_client = @saved_cs_client */;
152

    
153
--
154
-- Dumping data for table `event`
155
--
156

    
157
/*!40000 ALTER TABLE `event` DISABLE KEYS */;
158
/*!40000 ALTER TABLE `event` ENABLE KEYS */;
159

    
160
--
161
-- Table structure for table `geocoords`
162
--
163

    
164
/*!40101 SET @saved_cs_client     = @@character_set_client */;
165
/*!40101 SET character_set_client = utf8 */;
166
CREATE TABLE `geocoords` (
167
  `id` varbinary(767) NOT NULL,
168
  `latitude_deg` varbinary(767) NOT NULL,
169
  `longitude_deg` varbinary(767) NOT NULL,
170
  PRIMARY KEY (`id`),
171
  KEY `geocoords_unique` (`latitude_deg`,`longitude_deg`)
172
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A numerically-defined point';
173
/*!40101 SET character_set_client = @saved_cs_client */;
174

    
175
--
176
-- Dumping data for table `geocoords`
177
--
178

    
179
/*!40000 ALTER TABLE `geocoords` DISABLE KEYS */;
180
/*!40000 ALTER TABLE `geocoords` ENABLE KEYS */;
181

    
182
--
183
-- Table structure for table `geological_context`
184
--
185

    
186
/*!40101 SET @saved_cs_client     = @@character_set_client */;
187
/*!40101 SET character_set_client = utf8 */;
188
CREATE TABLE `geological_context` (
189
  `id` varbinary(767) NOT NULL,
190
  `name` varbinary(767) NOT NULL,
191
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
192
  PRIMARY KEY (`id`),
193
  CONSTRAINT `fk_geological_context_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
194
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"information pertaining to a location within a geological context, such as stratigraphy" ("DwC":http://rs.tdwg.org/dwc/terms/#GeologicalContext)';
195
/*!40101 SET character_set_client = @saved_cs_client */;
196

    
197
--
198
-- Dumping data for table `geological_context`
199
--
200

    
201
/*!40000 ALTER TABLE `geological_context` DISABLE KEYS */;
202
/*!40000 ALTER TABLE `geological_context` ENABLE KEYS */;
203

    
204
--
205
-- Table structure for table `geopath`
206
--
207

    
208
/*!40101 SET @saved_cs_client     = @@character_set_client */;
209
/*!40101 SET character_set_client = utf8 */;
210
CREATE TABLE `geopath` (
211
  `id` varbinary(767) NOT NULL,
212
  `continent` varbinary(767) DEFAULT NULL,
213
  `country` varbinary(767) NOT NULL,
214
  `state_province` varbinary(767) DEFAULT NULL,
215
  `county` varbinary(767) DEFAULT NULL,
216
  `municipality` varbinary(767) DEFAULT NULL,
217
  `ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
218
  PRIMARY KEY (`id`)
219
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A named region';
220
/*!40101 SET character_set_client = @saved_cs_client */;
221

    
222
--
223
-- Dumping data for table `geopath`
224
--
225

    
226
/*!40000 ALTER TABLE `geopath` DISABLE KEYS */;
227
/*!40000 ALTER TABLE `geopath` ENABLE KEYS */;
228

    
229
--
230
-- Table structure for table `geopath_scrub`
231
--
232

    
233
/*!40101 SET @saved_cs_client     = @@character_set_client */;
234
/*!40101 SET character_set_client = utf8 */;
235
CREATE TABLE `geopath_scrub` (
236
  `id` varbinary(767) NOT NULL,
237
  `input_geopath` varbinary(767) NOT NULL,
238
  `scrubbed_geopath` varbinary(767) DEFAULT NULL,
239
  PRIMARY KEY (`id`),
240
  KEY `fk_geopath_scrub_geopath1_idx` (`input_geopath`),
241
  KEY `fk_geopath_scrub_geopath2_idx` (`scrubbed_geopath`),
242
  CONSTRAINT `fk_geovalidation_record10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
243
  CONSTRAINT `fk_geopath_scrub_geopath1` FOREIGN KEY (`input_geopath`) REFERENCES `geopath` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
244
  CONSTRAINT `fk_geopath_scrub_geopath2` FOREIGN KEY (`scrubbed_geopath`) REFERENCES `geopath` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
245
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
246
/*!40101 SET character_set_client = @saved_cs_client */;
247

    
248
--
249
-- Dumping data for table `geopath_scrub`
250
--
251

    
252
/*!40000 ALTER TABLE `geopath_scrub` DISABLE KEYS */;
253
/*!40000 ALTER TABLE `geopath_scrub` ENABLE KEYS */;
254

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

    
259
/*!40101 SET @saved_cs_client     = @@character_set_client */;
260
/*!40101 SET character_set_client = utf8 */;
261
CREATE TABLE `georeferencing` (
262
  `id` varbinary(767) NOT NULL,
263
  `input_place` varbinary(767) NOT NULL,
264
  `georeferenced_by` varbinary(767) DEFAULT NULL,
265
  `georeferenced_place` varbinary(767) DEFAULT NULL,
266
  PRIMARY KEY (`id`),
267
  KEY `fk_georef_place1_idx` (`input_place`),
268
  KEY `fk_georeferencing_geoplace1_idx` (`georeferenced_place`),
269
  KEY `fk_georeferencing_party_list1_idx` (`georeferenced_by`),
270
  CONSTRAINT `fk_georeferencing_geoplace1` FOREIGN KEY (`georeferenced_place`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
271
  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,
273
  CONSTRAINT `fk_geovalidation_record100` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
274
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
275
/*!40101 SET character_set_client = @saved_cs_client */;
276

    
277
--
278
-- Dumping data for table `georeferencing`
279
--
280

    
281
/*!40000 ALTER TABLE `georeferencing` DISABLE KEYS */;
282
/*!40000 ALTER TABLE `georeferencing` ENABLE KEYS */;
283

    
284
--
285
-- Table structure for table `geovalidation`
286
--
287

    
288
/*!40101 SET @saved_cs_client     = @@character_set_client */;
289
/*!40101 SET character_set_client = utf8 */;
290
CREATE TABLE `geovalidation` (
291
  `id` varbinary(767) NOT NULL,
292
  `input_geoplace` varbinary(767) NOT NULL,
293
  `scrubbed_geoplace` varbinary(767) DEFAULT NULL,
294
  `geovalid` tinyint(1) NOT NULL,
295
  `lat_long_domain_valid` tinyint(1) NOT NULL,
296
  `lat_long_in_place_ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
297
  PRIMARY KEY (`id`),
298
  KEY `fk_geovalidation_geoplace1_idx` (`input_geoplace`),
299
  KEY `fk_geovalidation_geoplace2_idx` (`scrubbed_geoplace`),
300
  CONSTRAINT `fk_geovalidation_geoplace1` FOREIGN KEY (`input_geoplace`) REFERENCES `validatable_geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
301
  CONSTRAINT `fk_geovalidation_geoplace2` FOREIGN KEY (`scrubbed_geoplace`) REFERENCES `validatable_geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
302
  CONSTRAINT `fk_geovalidation_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
303
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='The accuracy of the [[VegCore#Coordinates|Coordinates]], taking into account the [[VegCore#Placename|Placename]]';
304
/*!40101 SET character_set_client = @saved_cs_client */;
305

    
306
--
307
-- Dumping data for table `geovalidation`
308
--
309

    
310
/*!40000 ALTER TABLE `geovalidation` DISABLE KEYS */;
311
/*!40000 ALTER TABLE `geovalidation` ENABLE KEYS */;
312

    
313
--
314
-- Table structure for table `individual`
315
--
316

    
317
/*!40101 SET @saved_cs_client     = @@character_set_client */;
318
/*!40101 SET character_set_client = utf8 */;
319
CREATE TABLE `individual` (
320
  `id` varbinary(767) NOT NULL,
321
  `tag` varbinary(767) DEFAULT NULL,
322
  `tag_history` set('hstore') COLLATE utf8_bin DEFAULT NULL,
323
  PRIMARY KEY (`id`),
324
  CONSTRAINT `fk_individual_record1` FOREIGN KEY (`id`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
325
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A distinct biological organism';
326
/*!40101 SET character_set_client = @saved_cs_client */;
327

    
328
--
329
-- Dumping data for table `individual`
330
--
331

    
332
/*!40000 ALTER TABLE `individual` DISABLE KEYS */;
333
/*!40000 ALTER TABLE `individual` ENABLE KEYS */;
334

    
335
--
336
-- Table structure for table `individual_observation`
337
--
338

    
339
/*!40101 SET @saved_cs_client     = @@character_set_client */;
340
/*!40101 SET character_set_client = utf8 */;
341
CREATE TABLE `individual_observation` (
342
  `id` varbinary(767) NOT NULL,
343
  `individual` varbinary(767) DEFAULT NULL,
344
  `code` varbinary(767) DEFAULT NULL,
345
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
346
  PRIMARY KEY (`id`),
347
  KEY `fk_individual_observation_individual1_idx` (`individual`),
348
  CONSTRAINT `fk_individual_observation_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
349
  CONSTRAINT `fk_individual_observation_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
350
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of an [[VegCore#Individual|Individual]]';
351
/*!40101 SET character_set_client = @saved_cs_client */;
352

    
353
--
354
-- Dumping data for table `individual_observation`
355
--
356

    
357
/*!40000 ALTER TABLE `individual_observation` DISABLE KEYS */;
358
/*!40000 ALTER TABLE `individual_observation` ENABLE KEYS */;
359

    
360
--
361
-- Table structure for table `method`
362
--
363

    
364
/*!40101 SET @saved_cs_client     = @@character_set_client */;
365
/*!40101 SET character_set_client = utf8 */;
366
CREATE TABLE `method` (
367
  `id` varbinary(767) NOT NULL,
368
  `parent` varbinary(767) NOT NULL,
369
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
370
  PRIMARY KEY (`id`),
371
  KEY `fk_method_method1_idx` (`parent`),
372
  CONSTRAINT `fk_method_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
373
  CONSTRAINT `fk_method_method1` FOREIGN KEY (`parent`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
374
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A specific method definition followed in the creation of the dataset. Each method links to a protocol and literature citation reference. A protocol may have many method or steps." ("VegX":http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/methods/method)';
375
/*!40101 SET character_set_client = @saved_cs_client */;
376

    
377
--
378
-- Dumping data for table `method`
379
--
380

    
381
/*!40000 ALTER TABLE `method` DISABLE KEYS */;
382
/*!40000 ALTER TABLE `method` ENABLE KEYS */;
383

    
384
--
385
-- Table structure for table `organization`
386
--
387

    
388
/*!40101 SET @saved_cs_client     = @@character_set_client */;
389
/*!40101 SET character_set_client = utf8 */;
390
CREATE TABLE `organization` (
391
  `id` varbinary(767) NOT NULL,
392
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
393
  PRIMARY KEY (`id`),
394
  CONSTRAINT `fk_organization_party1` FOREIGN KEY (`id`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
395
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
396
/*!40101 SET character_set_client = @saved_cs_client */;
397

    
398
--
399
-- Dumping data for table `organization`
400
--
401

    
402
/*!40000 ALTER TABLE `organization` DISABLE KEYS */;
403
/*!40000 ALTER TABLE `organization` ENABLE KEYS */;
404

    
405
--
406
-- Table structure for table `party`
407
--
408

    
409
/*!40101 SET @saved_cs_client     = @@character_set_client */;
410
/*!40101 SET character_set_client = utf8 */;
411
CREATE TABLE `party` (
412
  `id` varbinary(767) NOT NULL,
413
  `organization` varbinary(767) DEFAULT NULL,
414
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
415
  PRIMARY KEY (`id`),
416
  KEY `fk_party_organization1_idx` (`organization`),
417
  CONSTRAINT `fk_party_organization1` FOREIGN KEY (`organization`) REFERENCES `organization` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
418
  CONSTRAINT `fk_collection_source10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
419
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
420
/*!40101 SET character_set_client = @saved_cs_client */;
421

    
422
--
423
-- Dumping data for table `party`
424
--
425

    
426
/*!40000 ALTER TABLE `party` DISABLE KEYS */;
427
/*!40000 ALTER TABLE `party` ENABLE KEYS */;
428

    
429
--
430
-- Table structure for table `party_list`
431
--
432

    
433
/*!40101 SET @saved_cs_client     = @@character_set_client */;
434
/*!40101 SET character_set_client = utf8 */;
435
CREATE TABLE `party_list` (
436
  `id` varbinary(767) NOT NULL,
437
  `count` int(11) NOT NULL,
438
  PRIMARY KEY (`id`),
439
  CONSTRAINT `fk_collection_source100` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
440
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
441
/*!40101 SET character_set_client = @saved_cs_client */;
442

    
443
--
444
-- Dumping data for table `party_list`
445
--
446

    
447
/*!40000 ALTER TABLE `party_list` DISABLE KEYS */;
448
/*!40000 ALTER TABLE `party_list` ENABLE KEYS */;
449

    
450
--
451
-- Table structure for table `party_list_entry`
452
--
453

    
454
/*!40101 SET @saved_cs_client     = @@character_set_client */;
455
/*!40101 SET character_set_client = utf8 */;
456
CREATE TABLE `party_list_entry` (
457
  `id` varbinary(767) NOT NULL,
458
  `entry` varbinary(767) NOT NULL,
459
  `sort_order` int(11) DEFAULT NULL,
460
  PRIMARY KEY (`id`,`entry`),
461
  KEY `fk_party_list_has_party_party1_idx` (`entry`),
462
  KEY `fk_party_list_has_party_party_list1_idx` (`id`),
463
  CONSTRAINT `fk_party_list_has_party_party_list1` FOREIGN KEY (`id`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
464
  CONSTRAINT `fk_party_list_has_party_party1` FOREIGN KEY (`entry`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
465
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
466
/*!40101 SET character_set_client = @saved_cs_client */;
467

    
468
--
469
-- Dumping data for table `party_list_entry`
470
--
471

    
472
/*!40000 ALTER TABLE `party_list_entry` DISABLE KEYS */;
473
/*!40000 ALTER TABLE `party_list_entry` ENABLE KEYS */;
474

    
475
--
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
-- Table structure for table `place_observation`
505
--
506

    
507
/*!40101 SET @saved_cs_client     = @@character_set_client */;
508
/*!40101 SET character_set_client = utf8 */;
509
CREATE TABLE `place_observation` (
510
  `id` varbinary(767) NOT NULL,
511
  `place` varbinary(767) NOT NULL,
512
  `elevation_m` double DEFAULT NULL,
513
  `slope_incline_deg` double DEFAULT NULL,
514
  `slope_direction_deg_N` double DEFAULT NULL,
515
  `geological_context` varbinary(767) DEFAULT NULL,
516
  `community` varbinary(767) DEFAULT NULL,
517
  `observations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
518
  PRIMARY KEY (`id`),
519
  KEY `fk_place_observation_place1_idx` (`place`),
520
  KEY `fk_place_observation_geological_context1_idx` (`geological_context`),
521
  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,
523
  CONSTRAINT `fk_place_observation_geological_context1` FOREIGN KEY (`geological_context`) REFERENCES `geological_context` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
524
  CONSTRAINT `fk_place_observation_community1` FOREIGN KEY (`community`) REFERENCES `community` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
525
  CONSTRAINT `fk_place_observation_sampling_event1` FOREIGN KEY (`id`) REFERENCES `sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
526
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]';
527
/*!40101 SET character_set_client = @saved_cs_client */;
528

    
529
--
530
-- Dumping data for table `place_observation`
531
--
532

    
533
/*!40000 ALTER TABLE `place_observation` DISABLE KEYS */;
534
/*!40000 ALTER TABLE `place_observation` ENABLE KEYS */;
535

    
536
--
537
-- Table structure for table `plot`
538
--
539

    
540
/*!40101 SET @saved_cs_client     = @@character_set_client */;
541
/*!40101 SET character_set_client = utf8 */;
542
CREATE TABLE `plot` (
543
  `id` varbinary(767) NOT NULL,
544
  `name` varbinary(767) DEFAULT NULL,
545
  `area_m2` double DEFAULT NULL,
546
  `shape` varbinary(767) DEFAULT NULL,
547
  `bounding_box_rect` varbinary(767) DEFAULT NULL,
548
  `footprint_geom_WKT` varbinary(767) DEFAULT NULL,
549
  `dimensions` set('hstore') COLLATE utf8_bin DEFAULT NULL,
550
  PRIMARY KEY (`id`),
551
  CONSTRAINT `fk_subplot_place1` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
552
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
553
/*!40101 SET character_set_client = @saved_cs_client */;
554

    
555
--
556
-- Dumping data for table `plot`
557
--
558

    
559
/*!40000 ALTER TABLE `plot` DISABLE KEYS */;
560
/*!40000 ALTER TABLE `plot` ENABLE KEYS */;
561

    
562
--
563
-- Table structure for table `project`
564
--
565

    
566
/*!40101 SET @saved_cs_client     = @@character_set_client */;
567
/*!40101 SET character_set_client = utf8 */;
568
CREATE TABLE `project` (
569
  `id` varbinary(767) NOT NULL,
570
  `name` varbinary(767) NOT NULL,
571
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
572
  PRIMARY KEY (`id`),
573
  CONSTRAINT `fk_project_event1` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
574
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A "project established to collect vegetation plot data. Each plot originates as part of a project." ("VegBank":http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=project&entity=dba_tabledescription&where=where_tablename)';
575
/*!40101 SET character_set_client = @saved_cs_client */;
576

    
577
--
578
-- Dumping data for table `project`
579
--
580

    
581
/*!40000 ALTER TABLE `project` DISABLE KEYS */;
582
/*!40000 ALTER TABLE `project` ENABLE KEYS */;
583

    
584
--
585
-- Table structure for table `record`
586
--
587

    
588
/*!40101 SET @saved_cs_client     = @@character_set_client */;
589
/*!40101 SET character_set_client = utf8 */;
590
CREATE TABLE `record` (
591
  `id` varbinary(767) NOT NULL,
592
  `source` varbinary(767) NOT NULL,
593
  `source_id_scope` varbinary(767) DEFAULT NULL,
594
  `source_record_id` varbinary(767) DEFAULT NULL,
595
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
596
  PRIMARY KEY (`id`),
597
  UNIQUE KEY `record_unique` (`source`,`source_id_scope`,`source_record_id`),
598
  KEY `fk_record_source1_idx` (`source`),
599
  CONSTRAINT `fk_record_source1` FOREIGN KEY (`source`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
600
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
601
/*!40101 SET character_set_client = @saved_cs_client */;
602

    
603
--
604
-- Dumping data for table `record`
605
--
606

    
607
/*!40000 ALTER TABLE `record` DISABLE KEYS */;
608
/*!40000 ALTER TABLE `record` ENABLE KEYS */;
609

    
610
--
611
-- Table structure for table `referenced_class`
612
--
613

    
614
/*!40101 SET @saved_cs_client     = @@character_set_client */;
615
/*!40101 SET character_set_client = utf8 */;
616
CREATE TABLE `referenced_class` (
617
  `id` varbinary(767) NOT NULL,
618
  PRIMARY KEY (`id`),
619
  CONSTRAINT `fk_example_record10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
620
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
621
/*!40101 SET character_set_client = @saved_cs_client */;
622

    
623
--
624
-- Dumping data for table `referenced_class`
625
--
626

    
627
/*!40000 ALTER TABLE `referenced_class` DISABLE KEYS */;
628
/*!40000 ALTER TABLE `referenced_class` ENABLE KEYS */;
629

    
630
--
631
-- Table structure for table `relationship`
632
--
633

    
634
/*!40101 SET @saved_cs_client     = @@character_set_client */;
635
/*!40101 SET character_set_client = utf8 */;
636
CREATE TABLE `relationship` (
637
  `id` varbinary(767) NOT NULL,
638
  `record` varbinary(767) NOT NULL,
639
  `related_record` varbinary(767) NOT NULL,
640
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
641
  PRIMARY KEY (`id`),
642
  KEY `fk_relationship_record1_idx` (`record`),
643
  KEY `fk_relationship_related_record_idx` (`related_record`),
644
  CONSTRAINT `fk_relationship_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
645
  CONSTRAINT `fk_relationship_record2` FOREIGN KEY (`record`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
646
  CONSTRAINT `fk_relationship_related_record` FOREIGN KEY (`related_record`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
647
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"information pertaining to relationships between resources (instances of data records, such as Occurrences, Taxa, Locations, Events)" ("DwC":http://rs.tdwg.org/dwc/terms/#ResourceRelationship)';
648
/*!40101 SET character_set_client = @saved_cs_client */;
649

    
650
--
651
-- Dumping data for table `relationship`
652
--
653

    
654
/*!40000 ALTER TABLE `relationship` DISABLE KEYS */;
655
/*!40000 ALTER TABLE `relationship` ENABLE KEYS */;
656

    
657
--
658
-- Table structure for table `sampling_event`
659
--
660

    
661
/*!40101 SET @saved_cs_client     = @@character_set_client */;
662
/*!40101 SET character_set_client = utf8 */;
663
CREATE TABLE `sampling_event` (
664
  `id` varbinary(767) NOT NULL,
665
  `method` varbinary(767) DEFAULT NULL,
666
  PRIMARY KEY (`id`),
667
  KEY `fk_sampling_event_method1_idx` (`method`),
668
  CONSTRAINT `fk_sampling_event_method1` FOREIGN KEY (`method`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
669
  CONSTRAINT `fk_project_event10` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
670
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
671
/*!40101 SET character_set_client = @saved_cs_client */;
672

    
673
--
674
-- Dumping data for table `sampling_event`
675
--
676

    
677
/*!40000 ALTER TABLE `sampling_event` DISABLE KEYS */;
678
/*!40000 ALTER TABLE `sampling_event` ENABLE KEYS */;
679

    
680
--
681
-- Table structure for table `soil_observation`
682
--
683

    
684
/*!40101 SET @saved_cs_client     = @@character_set_client */;
685
/*!40101 SET character_set_client = utf8 */;
686
CREATE TABLE `soil_observation` (
687
  `id` varbinary(767) NOT NULL,
688
  `observations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
689
  PRIMARY KEY (`id`),
690
  CONSTRAINT `fk_soil_observation_place_observation1` FOREIGN KEY (`id`) REFERENCES `place_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
691
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]''s soil';
692
/*!40101 SET character_set_client = @saved_cs_client */;
693

    
694
--
695
-- Dumping data for table `soil_observation`
696
--
697

    
698
/*!40000 ALTER TABLE `soil_observation` DISABLE KEYS */;
699
/*!40000 ALTER TABLE `soil_observation` ENABLE KEYS */;
700

    
701
--
702
-- Table structure for table `source`
703
--
704

    
705
/*!40101 SET @saved_cs_client     = @@character_set_client */;
706
/*!40101 SET character_set_client = utf8 */;
707
CREATE TABLE `source` (
708
  `id` varbinary(767) NOT NULL,
709
  `parent` varbinary(767) NOT NULL,
710
  `name` varbinary(767) NOT NULL,
711
  `first_publisher` varbinary(767) DEFAULT NULL,
712
  `owner` varbinary(767) DEFAULT NULL,
713
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
714
  PRIMARY KEY (`id`),
715
  UNIQUE KEY `source_unique` (`parent`,`name`),
716
  KEY `fk_source1_idx` (`parent`),
717
  KEY `fk_source_party1_idx` (`owner`),
718
  KEY `fk_source_party2_idx` (`first_publisher`),
719
  CONSTRAINT `fk_source1` FOREIGN KEY (`parent`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
720
  CONSTRAINT `fk_source_party1` FOREIGN KEY (`owner`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
721
  CONSTRAINT `fk_source_party2` FOREIGN KEY (`first_publisher`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
722
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='a "reference [...] cited within the database" ("VegBank":http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=reference&entity=dba_tabledescription&where=where_tablename)';
723
/*!40101 SET character_set_client = @saved_cs_client */;
724

    
725
--
726
-- Dumping data for table `source`
727
--
728

    
729
/*!40000 ALTER TABLE `source` DISABLE KEYS */;
730
/*!40000 ALTER TABLE `source` ENABLE KEYS */;
731

    
732
--
733
-- Table structure for table `specimen`
734
--
735

    
736
/*!40101 SET @saved_cs_client     = @@character_set_client */;
737
/*!40101 SET character_set_client = utf8 */;
738
CREATE TABLE `specimen` (
739
  `id` varbinary(767) NOT NULL,
740
  `individual` varbinary(767) DEFAULT NULL,
741
  `code_in_individual` varbinary(767) DEFAULT NULL,
742
  `collection_event` varbinary(767) DEFAULT NULL,
743
  `orig_collection` varbinary(767) DEFAULT NULL,
744
  `barcode` varbinary(767) DEFAULT NULL,
745
  `accession_number` varbinary(767) DEFAULT NULL,
746
  `specimenholder_institutions` varbinary(767) DEFAULT NULL,
747
  `current_collection` varbinary(767) DEFAULT NULL,
748
  `owner_collection` varbinary(767) DEFAULT NULL,
749
  PRIMARY KEY (`id`),
750
  UNIQUE KEY `specimen_unique_in_individual` (`individual`,`code_in_individual`),
751
  UNIQUE KEY `specimen_unique_by_collection_event` (`collection_event`),
752
  UNIQUE KEY `specimen_unique_in_collection_by_barcode` (`orig_collection`,`barcode`),
753
  UNIQUE KEY `specimen_unique_in_collection_by_accession_number` (`orig_collection`,`accession_number`),
754
  KEY `fk_specimen_collection1_idx` (`orig_collection`),
755
  KEY `fk_specimen_taxon_observation1_idx` (`collection_event`),
756
  KEY `fk_specimen_individual1_idx` (`individual`),
757
  KEY `fk_specimen_collection2_idx` (`current_collection`),
758
  KEY `fk_specimen_organization3_idx` (`owner_collection`),
759
  KEY `fk_specimen_party_list1_idx` (`specimenholder_institutions`),
760
  CONSTRAINT `fk_specimen_organization3` FOREIGN KEY (`owner_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
761
  CONSTRAINT `fk_specimen_taxon_observation1` FOREIGN KEY (`collection_event`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
762
  CONSTRAINT `fk_specimen_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
763
  CONSTRAINT `fk_specimen_collection2` FOREIGN KEY (`current_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
764
  CONSTRAINT `fk_specimen_party_list1` FOREIGN KEY (`specimenholder_institutions`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
765
  CONSTRAINT `fk_specimen_collection1` FOREIGN KEY (`orig_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
766
  CONSTRAINT `fk_specimen_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
767
) 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';
768
/*!40101 SET character_set_client = @saved_cs_client */;
769

    
770
--
771
-- Dumping data for table `specimen`
772
--
773

    
774
/*!40000 ALTER TABLE `specimen` DISABLE KEYS */;
775
/*!40000 ALTER TABLE `specimen` ENABLE KEYS */;
776

    
777
--
778
-- Table structure for table `specimen_observation`
779
--
780

    
781
/*!40101 SET @saved_cs_client     = @@character_set_client */;
782
/*!40101 SET character_set_client = utf8 */;
783
CREATE TABLE `specimen_observation` (
784
  `id` varbinary(767) NOT NULL,
785
  `specimen` varbinary(767) NOT NULL,
786
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
787
  PRIMARY KEY (`id`),
788
  KEY `fk_specimen_observation_specimen1_idx` (`specimen`),
789
  CONSTRAINT `fk_specimen_taxon_occurrence10` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
790
  CONSTRAINT `fk_specimen_observation_specimen1` FOREIGN KEY (`specimen`) REFERENCES `specimen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
791
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
792
/*!40101 SET character_set_client = @saved_cs_client */;
793

    
794
--
795
-- Dumping data for table `specimen_observation`
796
--
797

    
798
/*!40000 ALTER TABLE `specimen_observation` DISABLE KEYS */;
799
/*!40000 ALTER TABLE `specimen_observation` ENABLE KEYS */;
800

    
801
--
802
-- Table structure for table `stem`
803
--
804

    
805
/*!40101 SET @saved_cs_client     = @@character_set_client */;
806
/*!40101 SET character_set_client = utf8 */;
807
CREATE TABLE `stem` (
808
  `id` varbinary(767) NOT NULL,
809
  `individual` varbinary(767) NOT NULL,
810
  PRIMARY KEY (`id`),
811
  KEY `fk_stem_individual1_idx` (`individual`),
812
  CONSTRAINT `fk_stem_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
813
  CONSTRAINT `fk_stem_individual2` FOREIGN KEY (`id`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
814
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An "individual tree stem" ("VegBank":http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemlocation&entity=dba_tabledescription&where=where_tablename)';
815
/*!40101 SET character_set_client = @saved_cs_client */;
816

    
817
--
818
-- Dumping data for table `stem`
819
--
820

    
821
/*!40000 ALTER TABLE `stem` DISABLE KEYS */;
822
/*!40000 ALTER TABLE `stem` ENABLE KEYS */;
823

    
824
--
825
-- Table structure for table `stem_observation`
826
--
827

    
828
/*!40101 SET @saved_cs_client     = @@character_set_client */;
829
/*!40101 SET character_set_client = utf8 */;
830
CREATE TABLE `stem_observation` (
831
  `id` varbinary(767) NOT NULL,
832
  `individual_observation` varbinary(767) NOT NULL,
833
  `stem` varbinary(767) DEFAULT NULL,
834
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
835
  PRIMARY KEY (`id`),
836
  UNIQUE KEY `stem_observation_unique` (`individual_observation`,`stem`),
837
  KEY `fk_stem_observation_individual_observation1_idx` (`individual_observation`),
838
  KEY `fk_stem_observation_stem1_idx` (`stem`),
839
  CONSTRAINT `fk_stem_observation_stem1` FOREIGN KEY (`stem`) REFERENCES `stem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
840
  CONSTRAINT `fk_stem_observation_individual_observation1` FOREIGN KEY (`individual_observation`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
841
  CONSTRAINT `fk_stem_observation_individual_observation2` FOREIGN KEY (`id`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
842
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of a [[VegCore#Stem|Stem]]';
843
/*!40101 SET character_set_client = @saved_cs_client */;
844

    
845
--
846
-- Dumping data for table `stem_observation`
847
--
848

    
849
/*!40000 ALTER TABLE `stem_observation` DISABLE KEYS */;
850
/*!40000 ALTER TABLE `stem_observation` ENABLE KEYS */;
851

    
852
--
853
-- Table structure for table `stratum`
854
--
855

    
856
/*!40101 SET @saved_cs_client     = @@character_set_client */;
857
/*!40101 SET character_set_client = utf8 */;
858
CREATE TABLE `stratum` (
859
  `id` varbinary(767) NOT NULL,
860
  `name` varbinary(767) NOT NULL,
861
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
862
  PRIMARY KEY (`id`),
863
  CONSTRAINT `fk_place_path_record10` FOREIGN KEY (`id`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
864
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
865
/*!40101 SET character_set_client = @saved_cs_client */;
866

    
867
--
868
-- Dumping data for table `stratum`
869
--
870

    
871
/*!40000 ALTER TABLE `stratum` DISABLE KEYS */;
872
/*!40000 ALTER TABLE `stratum` ENABLE KEYS */;
873

    
874
--
875
-- Table structure for table `subplot`
876
--
877

    
878
/*!40101 SET @saved_cs_client     = @@character_set_client */;
879
/*!40101 SET character_set_client = utf8 */;
880
CREATE TABLE `subplot` (
881
  `id` varbinary(767) NOT NULL,
882
  `x_m` double DEFAULT NULL,
883
  `y_m` double DEFAULT NULL,
884
  `coords` set('hstore') COLLATE utf8_bin DEFAULT NULL,
885
  PRIMARY KEY (`id`),
886
  CONSTRAINT `fk_subplot_plot1` FOREIGN KEY (`id`) REFERENCES `plot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
887
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"subplot, line, or any other subsample  or subdivision of plot" ("SALVIAS":http://salvias.net/Documents/salvias_data_dictionary.html#Plot_data/subplot)';
888
/*!40101 SET character_set_client = @saved_cs_client */;
889

    
890
--
891
-- Dumping data for table `subplot`
892
--
893

    
894
/*!40000 ALTER TABLE `subplot` DISABLE KEYS */;
895
/*!40000 ALTER TABLE `subplot` ENABLE KEYS */;
896

    
897
--
898
-- Table structure for table `taxon_absence`
899
--
900

    
901
/*!40101 SET @saved_cs_client     = @@character_set_client */;
902
/*!40101 SET character_set_client = utf8 */;
903
CREATE TABLE `taxon_absence` (
904
  `id` varbinary(767) NOT NULL,
905
  `taxon_concept` varbinary(767) NOT NULL,
906
  PRIMARY KEY (`id`),
907
  KEY `fk_taxon_presence_taxon_name1_idx` (`taxon_concept`),
908
  CONSTRAINT `fk_taxon_observation_taxon_occurrence10` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
909
  CONSTRAINT `fk_taxon_presence_taxon_name10` FOREIGN KEY (`taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
910
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation that a [[VegCore#Taxon|Taxon]]''s does _not_ exist in a place';
911
/*!40101 SET character_set_client = @saved_cs_client */;
912

    
913
--
914
-- Dumping data for table `taxon_absence`
915
--
916

    
917
/*!40000 ALTER TABLE `taxon_absence` DISABLE KEYS */;
918
/*!40000 ALTER TABLE `taxon_absence` ENABLE KEYS */;
919

    
920
--
921
-- Table structure for table `taxon_assertion`
922
--
923

    
924
/*!40101 SET @saved_cs_client     = @@character_set_client */;
925
/*!40101 SET character_set_client = utf8 */;
926
CREATE TABLE `taxon_assertion` (
927
  `id` varbinary(767) NOT NULL,
928
  `string` varbinary(767) NOT NULL COMMENT 'for parsed_taxon_assertion, this is the TNRS input name, not the concatenated matched name',
929
  `taxon` varbinary(767) DEFAULT NULL,
930
  `cf_aff` varbinary(767) DEFAULT NULL,
931
  `annotations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
932
  PRIMARY KEY (`id`),
933
  KEY `fk_taxon_assertion_taxon_string1_idx` (`string`),
934
  KEY `fk_taxon_assertion_taxon_name1_idx` (`taxon`),
935
  CONSTRAINT `fk_qualified_taxon_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
936
  CONSTRAINT `fk_taxon_assertion_taxon_string1` FOREIGN KEY (`string`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE,
937
  CONSTRAINT `fk_taxon_assertion_taxon_name1` FOREIGN KEY (`taxon`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
938
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
939
/*!40101 SET character_set_client = @saved_cs_client */;
940

    
941
--
942
-- Dumping data for table `taxon_assertion`
943
--
944

    
945
/*!40000 ALTER TABLE `taxon_assertion` DISABLE KEYS */;
946
/*!40000 ALTER TABLE `taxon_assertion` ENABLE KEYS */;
947

    
948
--
949
-- Table structure for table `taxon_concept`
950
--
951

    
952
/*!40101 SET @saved_cs_client     = @@character_set_client */;
953
/*!40101 SET character_set_client = utf8 */;
954
CREATE TABLE `taxon_concept` (
955
  `id` varbinary(767) NOT NULL,
956
  `according_to` varbinary(767) NOT NULL,
957
  `parent` varbinary(767) NOT NULL,
958
  `accepted_taxon_concept` varbinary(767) DEFAULT NULL,
959
  PRIMARY KEY (`id`),
960
  UNIQUE KEY `taxon_concept_unique_name` (`according_to`),
961
  KEY `fk_taxon_taxon1_idx` (`parent`),
962
  KEY `fk_taxon_concept_source1_idx` (`according_to`),
963
  KEY `fk_taxon_concept_taxon_concept1_idx` (`accepted_taxon_concept`),
964
  CONSTRAINT `fk_taxon_taxon1` FOREIGN KEY (`parent`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
965
  CONSTRAINT `fk_taxon_concept_source1` FOREIGN KEY (`according_to`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
966
  CONSTRAINT `fk_taxon_concept_taxon_concept1` FOREIGN KEY (`accepted_taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
967
  CONSTRAINT `fk_taxon_concept_taxon_name1` FOREIGN KEY (`id`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
968
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A [[VegCore#Taxon|Taxon]] described by a specific [[VegCore#Reference|Reference]]';
969
/*!40101 SET character_set_client = @saved_cs_client */;
970

    
971
--
972
-- Dumping data for table `taxon_concept`
973
--
974

    
975
/*!40000 ALTER TABLE `taxon_concept` DISABLE KEYS */;
976
/*!40000 ALTER TABLE `taxon_concept` ENABLE KEYS */;
977

    
978
--
979
-- Table structure for table `taxon_determination`
980
--
981

    
982
/*!40101 SET @saved_cs_client     = @@character_set_client */;
983
/*!40101 SET character_set_client = utf8 */;
984
CREATE TABLE `taxon_determination` (
985
  `id` varbinary(767) NOT NULL,
986
  `taxon_observation` varbinary(767) NOT NULL,
987
  `identified_by` varbinary(767) DEFAULT NULL,
988
  `taxon_assertion` varbinary(767) NOT NULL,
989
  `fit_info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
990
  PRIMARY KEY (`id`),
991
  UNIQUE KEY `taxon_determination_unique` (`taxon_assertion`,`identified_by`),
992
  KEY `fk_taxon_occurrence_has_qualified_taxon1_idx` (`taxon_assertion`),
993
  KEY `fk_taxon_determination_party_list1_idx` (`identified_by`),
994
  KEY `fk_taxon_determination_taxon_observation1_idx` (`taxon_observation`),
995
  CONSTRAINT `fk_taxon_occurrence_has_qualified_taxon1` FOREIGN KEY (`taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
996
  CONSTRAINT `fk_taxon_determination_party_list1` FOREIGN KEY (`identified_by`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
997
  CONSTRAINT `fk_taxon_determination_taxon_observation1` FOREIGN KEY (`taxon_observation`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
998
  CONSTRAINT `fk_taxon_determination_sampling_event1` FOREIGN KEY (`id`) REFERENCES `sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
999
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An assertion that a [[VegCore#TaxonOccurrence|TaxonOccurrence]] is a particular [[VegCore#Taxon|Taxon]]';
1000
/*!40101 SET character_set_client = @saved_cs_client */;
1001

    
1002
--
1003
-- Dumping data for table `taxon_determination`
1004
--
1005

    
1006
/*!40000 ALTER TABLE `taxon_determination` DISABLE KEYS */;
1007
/*!40000 ALTER TABLE `taxon_determination` ENABLE KEYS */;
1008

    
1009
--
1010
-- Table structure for table `taxon_name`
1011
--
1012

    
1013
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1014
/*!40101 SET character_set_client = utf8 */;
1015
CREATE TABLE `taxon_name` (
1016
  `id` varbinary(767) NOT NULL,
1017
  `unique_name` varbinary(767) NOT NULL,
1018
  `formal_name` varbinary(767) DEFAULT NULL,
1019
  `taxon_name` varbinary(767) DEFAULT NULL,
1020
  `author` varbinary(767) DEFAULT NULL,
1021
  `common_name` varbinary(767) DEFAULT NULL,
1022
  `rank` varbinary(767) DEFAULT NULL,
1023
  PRIMARY KEY (`id`),
1024
  KEY `fk_taxon_concept_taxon_string10_idx` (`unique_name`),
1025
  CONSTRAINT `fk_taxon_record10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1026
  CONSTRAINT `fk_taxon_concept_taxon_string10` FOREIGN KEY (`unique_name`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE
1027
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
1028
/*!40101 SET character_set_client = @saved_cs_client */;
1029

    
1030
--
1031
-- Dumping data for table `taxon_name`
1032
--
1033

    
1034
/*!40000 ALTER TABLE `taxon_name` DISABLE KEYS */;
1035
/*!40000 ALTER TABLE `taxon_name` ENABLE KEYS */;
1036

    
1037
--
1038
-- Table structure for table `taxon_observation`
1039
--
1040

    
1041
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1042
/*!40101 SET character_set_client = utf8 */;
1043
CREATE TABLE `taxon_observation` (
1044
  `id` varbinary(767) NOT NULL,
1045
  `taxon_occurrence` varbinary(767) NOT NULL,
1046
  `collectors` varbinary(767) DEFAULT NULL,
1047
  `collector_number` varbinary(767) DEFAULT NULL,
1048
  `voucher` varbinary(767) DEFAULT NULL,
1049
  `growth_form` varbinary(767) DEFAULT NULL,
1050
  `cultivated` tinyint(1) DEFAULT NULL,
1051
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1052
  PRIMARY KEY (`id`),
1053
  KEY `fk_taxon_observation_taxon_occurrence2_idx` (`taxon_occurrence`),
1054
  KEY `fk_taxon_observation_specimen1_idx` (`voucher`),
1055
  KEY `fk_taxon_observation_party_list1_idx` (`collectors`),
1056
  CONSTRAINT `fk_taxon_observation_party_list1` FOREIGN KEY (`collectors`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1057
  CONSTRAINT `fk_taxon_observation_sampling_event1` FOREIGN KEY (`id`) REFERENCES `sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1058
  CONSTRAINT `fk_taxon_observation_specimen1` FOREIGN KEY (`voucher`) REFERENCES `specimen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1059
  CONSTRAINT `fk_taxon_observation_taxon_occurrence2` FOREIGN KEY (`taxon_occurrence`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1060
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
1061
/*!40101 SET character_set_client = @saved_cs_client */;
1062

    
1063
--
1064
-- Dumping data for table `taxon_observation`
1065
--
1066

    
1067
/*!40000 ALTER TABLE `taxon_observation` DISABLE KEYS */;
1068
/*!40000 ALTER TABLE `taxon_observation` ENABLE KEYS */;
1069

    
1070
--
1071
-- Table structure for table `taxon_occurrence`
1072
--
1073

    
1074
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1075
/*!40101 SET character_set_client = utf8 */;
1076
CREATE TABLE `taxon_occurrence` (
1077
  `id` varbinary(767) NOT NULL,
1078
  `current_determination` varbinary(767) DEFAULT NULL,
1079
  `original_determination` varbinary(767) DEFAULT NULL,
1080
  PRIMARY KEY (`id`),
1081
  KEY `fk_taxon_occurrence_taxon_determination1_idx` (`original_determination`),
1082
  KEY `fk_taxon_occurrence_taxon_determination2_idx` (`current_determination`),
1083
  CONSTRAINT `fk_taxon_occurrence_taxon_determination1` FOREIGN KEY (`original_determination`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1084
  CONSTRAINT `fk_taxon_occurrence_taxon_determination2` FOREIGN KEY (`current_determination`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1085
  CONSTRAINT `fk_taxon_occurrence_event1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1086
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Any entity on which [[VegCore#TaxonDetermination|TaxonDetermination]]s can be made';
1087
/*!40101 SET character_set_client = @saved_cs_client */;
1088

    
1089
--
1090
-- Dumping data for table `taxon_occurrence`
1091
--
1092

    
1093
/*!40000 ALTER TABLE `taxon_occurrence` DISABLE KEYS */;
1094
/*!40000 ALTER TABLE `taxon_occurrence` ENABLE KEYS */;
1095

    
1096
--
1097
-- Table structure for table `taxon_path`
1098
--
1099

    
1100
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1101
/*!40101 SET character_set_client = utf8 */;
1102
CREATE TABLE `taxon_path` (
1103
  `id` varbinary(767) NOT NULL,
1104
  `family` varbinary(767) DEFAULT NULL,
1105
  `genus` varbinary(767) DEFAULT NULL,
1106
  `specific_epithet` varbinary(767) DEFAULT NULL,
1107
  `ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1108
  PRIMARY KEY (`id`),
1109
  CONSTRAINT `fk_taxon_path_taxon_name1` FOREIGN KEY (`id`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1110
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"a group of one (or more) populations of organism(s), which a taxonomist adjudges to be a unit" ("Wikipedia":http://en.wikipedia.org/wiki/Taxon)';
1111
/*!40101 SET character_set_client = @saved_cs_client */;
1112

    
1113
--
1114
-- Dumping data for table `taxon_path`
1115
--
1116

    
1117
/*!40000 ALTER TABLE `taxon_path` DISABLE KEYS */;
1118
/*!40000 ALTER TABLE `taxon_path` ENABLE KEYS */;
1119

    
1120
--
1121
-- Table structure for table `taxon_presence`
1122
--
1123

    
1124
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1125
/*!40101 SET character_set_client = utf8 */;
1126
CREATE TABLE `taxon_presence` (
1127
  `id` varbinary(767) NOT NULL,
1128
  `taxon_concept` varbinary(767) NOT NULL,
1129
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1130
  PRIMARY KEY (`id`),
1131
  KEY `fk_taxon_presence_taxon_name1_idx` (`taxon_concept`),
1132
  CONSTRAINT `fk_taxon_observation_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1133
  CONSTRAINT `fk_taxon_presence_taxon_name1` FOREIGN KEY (`taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1134
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of just a [[VegCore#Taxon|Taxon]]''s _presence_';
1135
/*!40101 SET character_set_client = @saved_cs_client */;
1136

    
1137
--
1138
-- Dumping data for table `taxon_presence`
1139
--
1140

    
1141
/*!40000 ALTER TABLE `taxon_presence` DISABLE KEYS */;
1142
/*!40000 ALTER TABLE `taxon_presence` ENABLE KEYS */;
1143

    
1144
--
1145
-- Table structure for table `taxon_scrub`
1146
--
1147

    
1148
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1149
/*!40101 SET character_set_client = utf8 */;
1150
CREATE TABLE `taxon_scrub` (
1151
  `id` varbinary(767) NOT NULL,
1152
  `input_string` varbinary(767) NOT NULL,
1153
  `parsed_taxon_assertion` varbinary(767) NOT NULL,
1154
  `matched_taxon_concept` varbinary(767) DEFAULT NULL,
1155
  `match_score` float DEFAULT NULL,
1156
  `match_info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1157
  PRIMARY KEY (`id`),
1158
  KEY `fk_parsed_taxon_assertion_taxon_name1_idx` (`matched_taxon_concept`),
1159
  KEY `fk_taxon_scrub_taxon_assertion1_idx` (`parsed_taxon_assertion`),
1160
  KEY `fk_taxon_scrub_taxon_string1_idx` (`input_string`),
1161
  CONSTRAINT `fk_parsed_taxon_assertion_taxon_name1` FOREIGN KEY (`matched_taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1162
  CONSTRAINT `fk_taxon_scrub_taxon_assertion1` FOREIGN KEY (`parsed_taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1163
  CONSTRAINT `fk_taxon_scrub_taxon_string1` FOREIGN KEY (`input_string`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE,
1164
  CONSTRAINT `fk_taxon_scrub_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1165
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
1166
/*!40101 SET character_set_client = @saved_cs_client */;
1167

    
1168
--
1169
-- Dumping data for table `taxon_scrub`
1170
--
1171

    
1172
/*!40000 ALTER TABLE `taxon_scrub` DISABLE KEYS */;
1173
/*!40000 ALTER TABLE `taxon_scrub` ENABLE KEYS */;
1174

    
1175
--
1176
-- Table structure for table `taxon_string`
1177
--
1178

    
1179
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1180
/*!40101 SET character_set_client = utf8 */;
1181
CREATE TABLE `taxon_string` (
1182
  `string` varbinary(767) NOT NULL,
1183
  PRIMARY KEY (`string`)
1184
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='to get the parsed_taxon_assertion (TNRS result) for a taxon_string, join using taxon_string.string<-taxon_assertion(string)::parsed_taxon_assertion[source=''TNRS.version''] (see wiki.vegpath.org/SQL_dotpaths)';
1185
/*!40101 SET character_set_client = @saved_cs_client */;
1186

    
1187
--
1188
-- Dumping data for table `taxon_string`
1189
--
1190

    
1191
/*!40000 ALTER TABLE `taxon_string` DISABLE KEYS */;
1192
/*!40000 ALTER TABLE `taxon_string` ENABLE KEYS */;
1193

    
1194
--
1195
-- Table structure for table `validatable_geoplace`
1196
--
1197

    
1198
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1199
/*!40101 SET character_set_client = utf8 */;
1200
CREATE TABLE `validatable_geoplace` (
1201
  `id` varbinary(767) NOT NULL,
1202
  `geocoords` varbinary(767) NOT NULL,
1203
  `geopath` varbinary(767) NOT NULL,
1204
  PRIMARY KEY (`id`),
1205
  UNIQUE KEY `validatable_place_unique` (`geopath`,`geocoords`),
1206
  KEY `fk_geovalidation_place_path1_idx` (`geopath`),
1207
  KEY `fk_geovalidation_coordinates1_idx` (`geocoords`),
1208
  CONSTRAINT `fk_geovalidation_place_path1` FOREIGN KEY (`geopath`) REFERENCES `geopath` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1209
  CONSTRAINT `fk_geovalidation_coordinates1` FOREIGN KEY (`geocoords`) REFERENCES `geocoords` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1210
  CONSTRAINT `fk_validatable_geoplace_geoplace1` FOREIGN KEY (`id`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1211
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
1212
/*!40101 SET character_set_client = @saved_cs_client */;
1213

    
1214
--
1215
-- Dumping data for table `validatable_geoplace`
1216
--
1217

    
1218
/*!40000 ALTER TABLE `validatable_geoplace` DISABLE KEYS */;
1219
/*!40000 ALTER TABLE `validatable_geoplace` ENABLE KEYS */;
1220
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
1221

    
1222
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
1223
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
1224
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
1225
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
1226
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
1227
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1228
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
1229

    
1230
-- Dump completed
(8-8/14)