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) DEFAULT 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 `geological_context`
162
--
163

    
164
/*!40101 SET @saved_cs_client     = @@character_set_client */;
165
/*!40101 SET character_set_client = utf8 */;
166
CREATE TABLE `geological_context` (
167
  `id` varbinary(767) NOT NULL,
168
  `name` varbinary(767) NOT NULL,
169
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
170
  PRIMARY KEY (`id`),
171
  CONSTRAINT `fk_geological_context_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
172
) 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)';
173
/*!40101 SET character_set_client = @saved_cs_client */;
174

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

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

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

    
186
/*!40101 SET @saved_cs_client     = @@character_set_client */;
187
/*!40101 SET character_set_client = utf8 */;
188
CREATE TABLE `geopath` (
189
  `id` varbinary(767) NOT NULL,
190
  `continent` varbinary(767) DEFAULT NULL,
191
  `country` varbinary(767) DEFAULT NULL,
192
  `state_province` varbinary(767) DEFAULT NULL,
193
  `county` varbinary(767) DEFAULT NULL,
194
  `municipality` varbinary(767) DEFAULT NULL,
195
  `ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
196
  PRIMARY KEY (`id`)
197
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A named region';
198
/*!40101 SET character_set_client = @saved_cs_client */;
199

    
200
--
201
-- Dumping data for table `geopath`
202
--
203

    
204
/*!40000 ALTER TABLE `geopath` DISABLE KEYS */;
205
/*!40000 ALTER TABLE `geopath` ENABLE KEYS */;
206

    
207
--
208
-- Table structure for table `geoplace`
209
--
210

    
211
/*!40101 SET @saved_cs_client     = @@character_set_client */;
212
/*!40101 SET character_set_client = utf8 */;
213
CREATE TABLE `geoplace` (
214
  `id` varbinary(767) NOT NULL,
215
  `latitude_deg` varbinary(767) NOT NULL,
216
  `longitude_deg` varbinary(767) NOT NULL,
217
  `footprint_geom_WKT` varbinary(767) NOT NULL DEFAULT 'point',
218
  PRIMARY KEY (`id`),
219
  CONSTRAINT `fk_geoplace_place1` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
220
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A numerically-defined point';
221
/*!40101 SET character_set_client = @saved_cs_client */;
222

    
223
--
224
-- Dumping data for table `geoplace`
225
--
226

    
227
/*!40000 ALTER TABLE `geoplace` DISABLE KEYS */;
228
/*!40000 ALTER TABLE `geoplace` ENABLE KEYS */;
229

    
230
--
231
-- Table structure for table `georeferencing`
232
--
233

    
234
/*!40101 SET @saved_cs_client     = @@character_set_client */;
235
/*!40101 SET character_set_client = utf8 */;
236
CREATE TABLE `georeferencing` (
237
  `id` varbinary(767) NOT NULL,
238
  `input_place` varbinary(767) NOT NULL,
239
  `georeferenced_by` varbinary(767) DEFAULT NULL,
240
  `geoplace` varbinary(767) DEFAULT NULL,
241
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
242
  PRIMARY KEY (`id`),
243
  KEY `fk_georef_place1_idx` (`input_place`),
244
  KEY `fk_georeferencing_party_list1_idx` (`georeferenced_by`),
245
  KEY `fk_georeferencing_geoplace1_idx` (`geoplace`),
246
  CONSTRAINT `fk_georeferencing_geoplace1` FOREIGN KEY (`geoplace`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
247
  CONSTRAINT `fk_georeferencing_party_list1` FOREIGN KEY (`georeferenced_by`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
248
  CONSTRAINT `fk_georef_place1` FOREIGN KEY (`input_place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
249
  CONSTRAINT `fk_geovalidation_record100` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
250
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='also stored GNRS results';
251
/*!40101 SET character_set_client = @saved_cs_client */;
252

    
253
--
254
-- Dumping data for table `georeferencing`
255
--
256

    
257
/*!40000 ALTER TABLE `georeferencing` DISABLE KEYS */;
258
/*!40000 ALTER TABLE `georeferencing` ENABLE KEYS */;
259

    
260
--
261
-- Table structure for table `geovalidation`
262
--
263

    
264
/*!40101 SET @saved_cs_client     = @@character_set_client */;
265
/*!40101 SET character_set_client = utf8 */;
266
CREATE TABLE `geovalidation` (
267
  `id` varbinary(767) NOT NULL,
268
  `input_geoplace` varbinary(767) NOT NULL,
269
  `corrected_geoplace` varbinary(767) DEFAULT NULL,
270
  `geovalid` tinyint(1) NOT NULL,
271
  `lat_long_domain_valid` tinyint(1) NOT NULL,
272
  `lat_long_in_place_ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
273
  PRIMARY KEY (`id`),
274
  KEY `fk_geovalidation_geoplace1_idx` (`input_geoplace`),
275
  KEY `fk_geovalidation_geoplace2_idx` (`corrected_geoplace`),
276
  CONSTRAINT `fk_geovalidation_geoplace1` FOREIGN KEY (`input_geoplace`) REFERENCES `scrubbed_geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
277
  CONSTRAINT `fk_geovalidation_geoplace2` FOREIGN KEY (`corrected_geoplace`) REFERENCES `scrubbed_geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
278
  CONSTRAINT `fk_geovalidation_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
279
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='The accuracy of the [[VegCore#Coordinates|Coordinates]], taking into account the [[VegCore#Placename|Placename]]';
280
/*!40101 SET character_set_client = @saved_cs_client */;
281

    
282
--
283
-- Dumping data for table `geovalidation`
284
--
285

    
286
/*!40000 ALTER TABLE `geovalidation` DISABLE KEYS */;
287
/*!40000 ALTER TABLE `geovalidation` ENABLE KEYS */;
288

    
289
--
290
-- Table structure for table `individual`
291
--
292

    
293
/*!40101 SET @saved_cs_client     = @@character_set_client */;
294
/*!40101 SET character_set_client = utf8 */;
295
CREATE TABLE `individual` (
296
  `id` varbinary(767) NOT NULL,
297
  `place` varbinary(767) NOT NULL,
298
  `tag` varbinary(767) DEFAULT NULL,
299
  `tag_history` set('hstore') COLLATE utf8_bin DEFAULT NULL,
300
  PRIMARY KEY (`id`),
301
  KEY `fk_individual_rel_place1_idx` (`place`),
302
  CONSTRAINT `fk_individual_rel_place1` FOREIGN KEY (`place`) REFERENCES `rel_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
303
  CONSTRAINT `fk_individual_record1` FOREIGN KEY (`id`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
304
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A distinct biological organism';
305
/*!40101 SET character_set_client = @saved_cs_client */;
306

    
307
--
308
-- Dumping data for table `individual`
309
--
310

    
311
/*!40000 ALTER TABLE `individual` DISABLE KEYS */;
312
/*!40000 ALTER TABLE `individual` ENABLE KEYS */;
313

    
314
--
315
-- Table structure for table `individual_observation`
316
--
317

    
318
/*!40101 SET @saved_cs_client     = @@character_set_client */;
319
/*!40101 SET character_set_client = utf8 */;
320
CREATE TABLE `individual_observation` (
321
  `id` varbinary(767) NOT NULL,
322
  `individual` varbinary(767) DEFAULT NULL,
323
  `code` varbinary(767) DEFAULT NULL,
324
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
325
  PRIMARY KEY (`id`),
326
  KEY `fk_individual_observation_individual1_idx` (`individual`),
327
  CONSTRAINT `fk_individual_observation_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
328
  CONSTRAINT `fk_individual_observation_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
329
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of an [[VegCore#Individual|Individual]]';
330
/*!40101 SET character_set_client = @saved_cs_client */;
331

    
332
--
333
-- Dumping data for table `individual_observation`
334
--
335

    
336
/*!40000 ALTER TABLE `individual_observation` DISABLE KEYS */;
337
/*!40000 ALTER TABLE `individual_observation` ENABLE KEYS */;
338

    
339
--
340
-- Table structure for table `method`
341
--
342

    
343
/*!40101 SET @saved_cs_client     = @@character_set_client */;
344
/*!40101 SET character_set_client = utf8 */;
345
CREATE TABLE `method` (
346
  `id` varbinary(767) NOT NULL,
347
  `parent` varbinary(767) NOT NULL,
348
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
349
  PRIMARY KEY (`id`),
350
  KEY `fk_method_method1_idx` (`parent`),
351
  CONSTRAINT `fk_method_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
352
  CONSTRAINT `fk_method_method1` FOREIGN KEY (`parent`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
353
) 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)';
354
/*!40101 SET character_set_client = @saved_cs_client */;
355

    
356
--
357
-- Dumping data for table `method`
358
--
359

    
360
/*!40000 ALTER TABLE `method` DISABLE KEYS */;
361
/*!40000 ALTER TABLE `method` ENABLE KEYS */;
362

    
363
--
364
-- Table structure for table `organization`
365
--
366

    
367
/*!40101 SET @saved_cs_client     = @@character_set_client */;
368
/*!40101 SET character_set_client = utf8 */;
369
CREATE TABLE `organization` (
370
  `id` varbinary(767) NOT NULL,
371
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
372
  PRIMARY KEY (`id`),
373
  CONSTRAINT `fk_organization_party1` FOREIGN KEY (`id`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
374
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
375
/*!40101 SET character_set_client = @saved_cs_client */;
376

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

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

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

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

    
401
--
402
-- Dumping data for table `party`
403
--
404

    
405
/*!40000 ALTER TABLE `party` DISABLE KEYS */;
406
/*!40000 ALTER TABLE `party` ENABLE KEYS */;
407

    
408
--
409
-- Table structure for table `party_list`
410
--
411

    
412
/*!40101 SET @saved_cs_client     = @@character_set_client */;
413
/*!40101 SET character_set_client = utf8 */;
414
CREATE TABLE `party_list` (
415
  `id` varbinary(767) NOT NULL,
416
  `count` int(11) NOT NULL,
417
  PRIMARY KEY (`id`),
418
  CONSTRAINT `fk_collection_source100` 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_list`
424
--
425

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

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

    
433
/*!40101 SET @saved_cs_client     = @@character_set_client */;
434
/*!40101 SET character_set_client = utf8 */;
435
CREATE TABLE `party_list_entry` (
436
  `id` varbinary(767) NOT NULL,
437
  `entry` varbinary(767) NOT NULL,
438
  `sort_order` int(11) DEFAULT NULL,
439
  PRIMARY KEY (`id`,`entry`),
440
  KEY `fk_party_list_has_party_party1_idx` (`entry`),
441
  KEY `fk_party_list_has_party_party_list1_idx` (`id`),
442
  CONSTRAINT `fk_party_list_has_party_party_list1` FOREIGN KEY (`id`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
443
  CONSTRAINT `fk_party_list_has_party_party1` FOREIGN KEY (`entry`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
444
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
445
/*!40101 SET character_set_client = @saved_cs_client */;
446

    
447
--
448
-- Dumping data for table `party_list_entry`
449
--
450

    
451
/*!40000 ALTER TABLE `party_list_entry` DISABLE KEYS */;
452
/*!40000 ALTER TABLE `party_list_entry` ENABLE KEYS */;
453

    
454
--
455
-- Table structure for table `place`
456
--
457

    
458
/*!40101 SET @saved_cs_client     = @@character_set_client */;
459
/*!40101 SET character_set_client = utf8 */;
460
CREATE TABLE `place` (
461
  `id` varbinary(767) NOT NULL,
462
  `parent` varbinary(767) DEFAULT NULL,
463
  `rank` varbinary(767) DEFAULT NULL,
464
  `name` varbinary(767) DEFAULT NULL,
465
  `geopath` varbinary(767) DEFAULT NULL,
466
  `locality` varbinary(767) DEFAULT NULL,
467
  `verbatim` set('hstore') COLLATE utf8_bin DEFAULT NULL COMMENT 'for verbatim coordinates, etc.',
468
  PRIMARY KEY (`id`),
469
  KEY `fk_place1_idx` (`parent`),
470
  KEY `fk_place_geopath1_idx` (`geopath`),
471
  CONSTRAINT `fk_place1` FOREIGN KEY (`parent`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
472
  CONSTRAINT `fk_place_geopath1` FOREIGN KEY (`geopath`) REFERENCES `geopath` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
473
  CONSTRAINT `fk_place_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
474
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A spatial region" ("DwC":http://rs.tdwg.org/dwc/terms/#dcterms:Location) or point';
475
/*!40101 SET character_set_client = @saved_cs_client */;
476

    
477
--
478
-- Dumping data for table `place`
479
--
480

    
481
/*!40000 ALTER TABLE `place` DISABLE KEYS */;
482
/*!40000 ALTER TABLE `place` ENABLE KEYS */;
483

    
484
--
485
-- Table structure for table `place_observation`
486
--
487

    
488
/*!40101 SET @saved_cs_client     = @@character_set_client */;
489
/*!40101 SET character_set_client = utf8 */;
490
CREATE TABLE `place_observation` (
491
  `id` varbinary(767) NOT NULL,
492
  `place` varbinary(767) NOT NULL,
493
  `elevation_m` double DEFAULT NULL,
494
  `slope_incline_deg` double DEFAULT NULL,
495
  `slope_direction_deg_N` double DEFAULT NULL,
496
  `geological_context` varbinary(767) DEFAULT NULL,
497
  `community` varbinary(767) DEFAULT NULL,
498
  `observations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
499
  PRIMARY KEY (`id`),
500
  KEY `fk_place_observation_place1_idx` (`place`),
501
  KEY `fk_place_observation_geological_context1_idx` (`geological_context`),
502
  KEY `fk_place_observation_community1_idx` (`community`),
503
  CONSTRAINT `fk_place_observation_place1` FOREIGN KEY (`place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
504
  CONSTRAINT `fk_place_observation_geological_context1` FOREIGN KEY (`geological_context`) REFERENCES `geological_context` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
505
  CONSTRAINT `fk_place_observation_community1` FOREIGN KEY (`community`) REFERENCES `community` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
506
  CONSTRAINT `fk_place_observation_sampling_event1` FOREIGN KEY (`id`) REFERENCES `sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
507
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]';
508
/*!40101 SET character_set_client = @saved_cs_client */;
509

    
510
--
511
-- Dumping data for table `place_observation`
512
--
513

    
514
/*!40000 ALTER TABLE `place_observation` DISABLE KEYS */;
515
/*!40000 ALTER TABLE `place_observation` ENABLE KEYS */;
516

    
517
--
518
-- Table structure for table `plot`
519
--
520

    
521
/*!40101 SET @saved_cs_client     = @@character_set_client */;
522
/*!40101 SET character_set_client = utf8 */;
523
CREATE TABLE `plot` (
524
  `id` varbinary(767) NOT NULL,
525
  `name` varbinary(767) DEFAULT NULL,
526
  `area_m2` double DEFAULT NULL,
527
  `shape` varbinary(767) DEFAULT NULL,
528
  `length_m` varbinary(767) DEFAULT NULL,
529
  `width_m` varbinary(767) DEFAULT NULL,
530
  `azimuth_deg_N` varbinary(767) DEFAULT NULL,
531
  `footprint_geom_WKT` varbinary(767) DEFAULT NULL,
532
  `dimensions` set('hstore') COLLATE utf8_bin DEFAULT NULL,
533
  PRIMARY KEY (`id`),
534
  CONSTRAINT `fk_subplot_place1` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
535
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
536
/*!40101 SET character_set_client = @saved_cs_client */;
537

    
538
--
539
-- Dumping data for table `plot`
540
--
541

    
542
/*!40000 ALTER TABLE `plot` DISABLE KEYS */;
543
/*!40000 ALTER TABLE `plot` ENABLE KEYS */;
544

    
545
--
546
-- Table structure for table `plot_element`
547
--
548

    
549
/*!40101 SET @saved_cs_client     = @@character_set_client */;
550
/*!40101 SET character_set_client = utf8 */;
551
CREATE TABLE `plot_element` (
552
  `id` varbinary(767) NOT NULL,
553
  `parent_plot` varbinary(767) NOT NULL,
554
  PRIMARY KEY (`id`),
555
  KEY `fk_subplot_plot2_idx` (`parent_plot`),
556
  CONSTRAINT `fk_subplot_rel_place10` FOREIGN KEY (`id`) REFERENCES `rel_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
557
  CONSTRAINT `fk_subplot_plot20` FOREIGN KEY (`parent_plot`) REFERENCES `plot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
558
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
559
/*!40101 SET character_set_client = @saved_cs_client */;
560

    
561
--
562
-- Dumping data for table `plot_element`
563
--
564

    
565
/*!40000 ALTER TABLE `plot_element` DISABLE KEYS */;
566
/*!40000 ALTER TABLE `plot_element` ENABLE KEYS */;
567

    
568
--
569
-- Table structure for table `project`
570
--
571

    
572
/*!40101 SET @saved_cs_client     = @@character_set_client */;
573
/*!40101 SET character_set_client = utf8 */;
574
CREATE TABLE `project` (
575
  `id` varbinary(767) NOT NULL,
576
  `name` varbinary(767) NOT NULL,
577
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
578
  PRIMARY KEY (`id`),
579
  CONSTRAINT `fk_project_event1` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
580
) 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)';
581
/*!40101 SET character_set_client = @saved_cs_client */;
582

    
583
--
584
-- Dumping data for table `project`
585
--
586

    
587
/*!40000 ALTER TABLE `project` DISABLE KEYS */;
588
/*!40000 ALTER TABLE `project` ENABLE KEYS */;
589

    
590
--
591
-- Table structure for table `record`
592
--
593

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

    
609
--
610
-- Dumping data for table `record`
611
--
612

    
613
/*!40000 ALTER TABLE `record` DISABLE KEYS */;
614
/*!40000 ALTER TABLE `record` ENABLE KEYS */;
615

    
616
--
617
-- Table structure for table `referenced_class`
618
--
619

    
620
/*!40101 SET @saved_cs_client     = @@character_set_client */;
621
/*!40101 SET character_set_client = utf8 */;
622
CREATE TABLE `referenced_class` (
623
  `id` varbinary(767) NOT NULL,
624
  PRIMARY KEY (`id`),
625
  CONSTRAINT `fk_example_record10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
626
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
627
/*!40101 SET character_set_client = @saved_cs_client */;
628

    
629
--
630
-- Dumping data for table `referenced_class`
631
--
632

    
633
/*!40000 ALTER TABLE `referenced_class` DISABLE KEYS */;
634
/*!40000 ALTER TABLE `referenced_class` ENABLE KEYS */;
635

    
636
--
637
-- Table structure for table `rel_place`
638
--
639

    
640
/*!40101 SET @saved_cs_client     = @@character_set_client */;
641
/*!40101 SET character_set_client = utf8 */;
642
CREATE TABLE `rel_place` (
643
  `id` varbinary(767) NOT NULL,
644
  `x_m` double DEFAULT NULL,
645
  `y_m` double DEFAULT NULL,
646
  `coords` set('hstore') COLLATE utf8_bin DEFAULT NULL,
647
  PRIMARY KEY (`id`),
648
  CONSTRAINT `fk_subplot_place2` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
649
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='stores plot elements such as subplots ("subplot, line, or any other subsample  or subdivision of plot" ("SALVIAS":http://salvias.net/Documents/salvias_data_dictionary.html#Plot_data/subplot))';
650
/*!40101 SET character_set_client = @saved_cs_client */;
651

    
652
--
653
-- Dumping data for table `rel_place`
654
--
655

    
656
/*!40000 ALTER TABLE `rel_place` DISABLE KEYS */;
657
/*!40000 ALTER TABLE `rel_place` ENABLE KEYS */;
658

    
659
--
660
-- Table structure for table `relationship`
661
--
662

    
663
/*!40101 SET @saved_cs_client     = @@character_set_client */;
664
/*!40101 SET character_set_client = utf8 */;
665
CREATE TABLE `relationship` (
666
  `id` varbinary(767) NOT NULL,
667
  `record` varbinary(767) NOT NULL,
668
  `related_record` varbinary(767) NOT NULL,
669
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
670
  PRIMARY KEY (`id`),
671
  KEY `fk_relationship_record1_idx` (`record`),
672
  KEY `fk_relationship_related_record_idx` (`related_record`),
673
  CONSTRAINT `fk_relationship_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
674
  CONSTRAINT `fk_relationship_record2` FOREIGN KEY (`record`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
675
  CONSTRAINT `fk_relationship_related_record` FOREIGN KEY (`related_record`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
676
) 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)';
677
/*!40101 SET character_set_client = @saved_cs_client */;
678

    
679
--
680
-- Dumping data for table `relationship`
681
--
682

    
683
/*!40000 ALTER TABLE `relationship` DISABLE KEYS */;
684
/*!40000 ALTER TABLE `relationship` ENABLE KEYS */;
685

    
686
--
687
-- Table structure for table `reobservable`
688
--
689

    
690
/*!40101 SET @saved_cs_client     = @@character_set_client */;
691
/*!40101 SET character_set_client = utf8 */;
692
CREATE TABLE `reobservable` (
693
  `id` varbinary(767) NOT NULL,
694
  `current_determination` varbinary(767) DEFAULT NULL,
695
  `original_determination` varbinary(767) DEFAULT NULL,
696
  PRIMARY KEY (`id`),
697
  KEY `fk_taxon_occurrence_taxon_determination1_idx` (`original_determination`),
698
  KEY `fk_taxon_occurrence_taxon_determination2_idx` (`current_determination`),
699
  CONSTRAINT `fk_taxon_occurrence_taxon_determination1` FOREIGN KEY (`original_determination`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
700
  CONSTRAINT `fk_taxon_occurrence_taxon_determination2` FOREIGN KEY (`current_determination`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
701
  CONSTRAINT `fk_taxon_occurrence_event1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
702
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Any entity on which [[VegCore#TaxonDetermination|TaxonDetermination]]s can be made';
703
/*!40101 SET character_set_client = @saved_cs_client */;
704

    
705
--
706
-- Dumping data for table `reobservable`
707
--
708

    
709
/*!40000 ALTER TABLE `reobservable` DISABLE KEYS */;
710
/*!40000 ALTER TABLE `reobservable` ENABLE KEYS */;
711

    
712
--
713
-- Table structure for table `sampling_event`
714
--
715

    
716
/*!40101 SET @saved_cs_client     = @@character_set_client */;
717
/*!40101 SET character_set_client = utf8 */;
718
CREATE TABLE `sampling_event` (
719
  `id` varbinary(767) NOT NULL,
720
  `method` varbinary(767) DEFAULT NULL,
721
  PRIMARY KEY (`id`),
722
  KEY `fk_sampling_event_method1_idx` (`method`),
723
  CONSTRAINT `fk_sampling_event_method1` FOREIGN KEY (`method`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
724
  CONSTRAINT `fk_project_event10` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
725
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
726
/*!40101 SET character_set_client = @saved_cs_client */;
727

    
728
--
729
-- Dumping data for table `sampling_event`
730
--
731

    
732
/*!40000 ALTER TABLE `sampling_event` DISABLE KEYS */;
733
/*!40000 ALTER TABLE `sampling_event` ENABLE KEYS */;
734

    
735
--
736
-- Table structure for table `scrubbed_geoplace`
737
--
738

    
739
/*!40101 SET @saved_cs_client     = @@character_set_client */;
740
/*!40101 SET character_set_client = utf8 */;
741
CREATE TABLE `scrubbed_geoplace` (
742
  `id` varbinary(767) NOT NULL,
743
  `parent_geoplace` varbinary(767) NOT NULL,
744
  PRIMARY KEY (`id`),
745
  KEY `fk_geoplace_geoplace1_idx` (`parent_geoplace`),
746
  CONSTRAINT `fk_geoplace_geoplace1` FOREIGN KEY (`parent_geoplace`) REFERENCES `scrubbed_geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
747
  CONSTRAINT `fk_nested_geoplace_geoplace1` FOREIGN KEY (`id`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
748
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='stores only scrubbed geoplaces (GADM places, and distinct point coordinates that GNRS says should be located within them)';
749
/*!40101 SET character_set_client = @saved_cs_client */;
750

    
751
--
752
-- Dumping data for table `scrubbed_geoplace`
753
--
754

    
755
/*!40000 ALTER TABLE `scrubbed_geoplace` DISABLE KEYS */;
756
/*!40000 ALTER TABLE `scrubbed_geoplace` ENABLE KEYS */;
757

    
758
--
759
-- Table structure for table `soil_observation`
760
--
761

    
762
/*!40101 SET @saved_cs_client     = @@character_set_client */;
763
/*!40101 SET character_set_client = utf8 */;
764
CREATE TABLE `soil_observation` (
765
  `id` varbinary(767) NOT NULL,
766
  `observations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
767
  PRIMARY KEY (`id`),
768
  CONSTRAINT `fk_soil_observation_place_observation1` FOREIGN KEY (`id`) REFERENCES `place_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
769
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]''s soil';
770
/*!40101 SET character_set_client = @saved_cs_client */;
771

    
772
--
773
-- Dumping data for table `soil_observation`
774
--
775

    
776
/*!40000 ALTER TABLE `soil_observation` DISABLE KEYS */;
777
/*!40000 ALTER TABLE `soil_observation` ENABLE KEYS */;
778

    
779
--
780
-- Table structure for table `source`
781
--
782

    
783
/*!40101 SET @saved_cs_client     = @@character_set_client */;
784
/*!40101 SET character_set_client = utf8 */;
785
CREATE TABLE `source` (
786
  `id` varbinary(767) NOT NULL,
787
  `parent` varbinary(767) DEFAULT NULL,
788
  `name` varbinary(767) NOT NULL,
789
  `first_publisher` varbinary(767) DEFAULT NULL,
790
  `owner` varbinary(767) DEFAULT NULL,
791
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
792
  PRIMARY KEY (`id`),
793
  UNIQUE KEY `source_unique` (`parent`,`name`),
794
  KEY `fk_source1_idx` (`parent`),
795
  KEY `fk_source_party1_idx` (`owner`),
796
  KEY `fk_source_party2_idx` (`first_publisher`),
797
  CONSTRAINT `fk_source1` FOREIGN KEY (`parent`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
798
  CONSTRAINT `fk_source_party1` FOREIGN KEY (`owner`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
799
  CONSTRAINT `fk_source_party2` FOREIGN KEY (`first_publisher`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
800
) 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)';
801
/*!40101 SET character_set_client = @saved_cs_client */;
802

    
803
--
804
-- Dumping data for table `source`
805
--
806

    
807
/*!40000 ALTER TABLE `source` DISABLE KEYS */;
808
/*!40000 ALTER TABLE `source` ENABLE KEYS */;
809

    
810
--
811
-- Table structure for table `specimen`
812
--
813

    
814
/*!40101 SET @saved_cs_client     = @@character_set_client */;
815
/*!40101 SET character_set_client = utf8 */;
816
CREATE TABLE `specimen` (
817
  `id` varbinary(767) NOT NULL,
818
  `individual` varbinary(767) DEFAULT NULL,
819
  `code_in_individual` varbinary(767) DEFAULT NULL,
820
  `collection_event` varbinary(767) DEFAULT NULL,
821
  `orig_collection` varbinary(767) DEFAULT NULL,
822
  `barcode` varbinary(767) DEFAULT NULL,
823
  `accession_number` varbinary(767) DEFAULT NULL,
824
  `specimenholder_institutions` varbinary(767) DEFAULT NULL,
825
  `current_collection` varbinary(767) DEFAULT NULL,
826
  `owner_collection` varbinary(767) DEFAULT NULL,
827
  PRIMARY KEY (`id`),
828
  UNIQUE KEY `specimen_unique_in_individual` (`individual`,`code_in_individual`),
829
  UNIQUE KEY `specimen_unique_by_collection_event` (`collection_event`),
830
  UNIQUE KEY `specimen_unique_in_collection_by_barcode` (`orig_collection`,`barcode`),
831
  UNIQUE KEY `specimen_unique_in_collection_by_accession_number` (`orig_collection`,`accession_number`),
832
  KEY `fk_specimen_collection1_idx` (`orig_collection`),
833
  KEY `fk_specimen_taxon_observation1_idx` (`collection_event`),
834
  KEY `fk_specimen_individual1_idx` (`individual`),
835
  KEY `fk_specimen_collection2_idx` (`current_collection`),
836
  KEY `fk_specimen_organization3_idx` (`owner_collection`),
837
  KEY `fk_specimen_party_list1_idx` (`specimenholder_institutions`),
838
  CONSTRAINT `fk_specimen_organization3` FOREIGN KEY (`owner_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
839
  CONSTRAINT `fk_specimen_taxon_observation1` FOREIGN KEY (`collection_event`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
840
  CONSTRAINT `fk_specimen_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
841
  CONSTRAINT `fk_specimen_collection2` FOREIGN KEY (`current_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
842
  CONSTRAINT `fk_specimen_party_list1` FOREIGN KEY (`specimenholder_institutions`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
843
  CONSTRAINT `fk_specimen_collection1` FOREIGN KEY (`orig_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
844
  CONSTRAINT `fk_specimen_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
845
) 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';
846
/*!40101 SET character_set_client = @saved_cs_client */;
847

    
848
--
849
-- Dumping data for table `specimen`
850
--
851

    
852
/*!40000 ALTER TABLE `specimen` DISABLE KEYS */;
853
/*!40000 ALTER TABLE `specimen` ENABLE KEYS */;
854

    
855
--
856
-- Table structure for table `specimen_observation`
857
--
858

    
859
/*!40101 SET @saved_cs_client     = @@character_set_client */;
860
/*!40101 SET character_set_client = utf8 */;
861
CREATE TABLE `specimen_observation` (
862
  `id` varbinary(767) NOT NULL,
863
  `specimen` varbinary(767) NOT NULL,
864
  `description` varbinary(767) DEFAULT NULL,
865
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
866
  PRIMARY KEY (`id`),
867
  KEY `fk_specimen_observation_specimen1_idx` (`specimen`),
868
  CONSTRAINT `fk_specimen_taxon_occurrence10` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
869
  CONSTRAINT `fk_specimen_observation_specimen1` FOREIGN KEY (`specimen`) REFERENCES `specimen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
870
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
871
/*!40101 SET character_set_client = @saved_cs_client */;
872

    
873
--
874
-- Dumping data for table `specimen_observation`
875
--
876

    
877
/*!40000 ALTER TABLE `specimen_observation` DISABLE KEYS */;
878
/*!40000 ALTER TABLE `specimen_observation` ENABLE KEYS */;
879

    
880
--
881
-- Table structure for table `stem`
882
--
883

    
884
/*!40101 SET @saved_cs_client     = @@character_set_client */;
885
/*!40101 SET character_set_client = utf8 */;
886
CREATE TABLE `stem` (
887
  `id` varbinary(767) NOT NULL,
888
  `individual` varbinary(767) DEFAULT NULL,
889
  PRIMARY KEY (`id`),
890
  KEY `fk_stem_individual1_idx` (`individual`),
891
  CONSTRAINT `fk_stem_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
892
  CONSTRAINT `fk_stem_individual2` FOREIGN KEY (`id`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
893
) 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)';
894
/*!40101 SET character_set_client = @saved_cs_client */;
895

    
896
--
897
-- Dumping data for table `stem`
898
--
899

    
900
/*!40000 ALTER TABLE `stem` DISABLE KEYS */;
901
/*!40000 ALTER TABLE `stem` ENABLE KEYS */;
902

    
903
--
904
-- Table structure for table `stem_observation`
905
--
906

    
907
/*!40101 SET @saved_cs_client     = @@character_set_client */;
908
/*!40101 SET character_set_client = utf8 */;
909
CREATE TABLE `stem_observation` (
910
  `id` varbinary(767) NOT NULL,
911
  `individual_observation` varbinary(767) DEFAULT NULL,
912
  `stem` varbinary(767) DEFAULT NULL,
913
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
914
  PRIMARY KEY (`id`),
915
  UNIQUE KEY `stem_observation_unique` (`individual_observation`,`stem`),
916
  KEY `fk_stem_observation_individual_observation1_idx` (`individual_observation`),
917
  KEY `fk_stem_observation_stem1_idx` (`stem`),
918
  CONSTRAINT `fk_stem_observation_stem1` FOREIGN KEY (`stem`) REFERENCES `stem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
919
  CONSTRAINT `fk_stem_observation_individual_observation1` FOREIGN KEY (`individual_observation`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
920
  CONSTRAINT `fk_stem_observation_individual_observation2` FOREIGN KEY (`id`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
921
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of a [[VegCore#Stem|Stem]]';
922
/*!40101 SET character_set_client = @saved_cs_client */;
923

    
924
--
925
-- Dumping data for table `stem_observation`
926
--
927

    
928
/*!40000 ALTER TABLE `stem_observation` DISABLE KEYS */;
929
/*!40000 ALTER TABLE `stem_observation` ENABLE KEYS */;
930

    
931
--
932
-- Table structure for table `stratum`
933
--
934

    
935
/*!40101 SET @saved_cs_client     = @@character_set_client */;
936
/*!40101 SET character_set_client = utf8 */;
937
CREATE TABLE `stratum` (
938
  `id` varbinary(767) NOT NULL,
939
  `name` varbinary(767) NOT NULL,
940
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
941
  PRIMARY KEY (`id`),
942
  CONSTRAINT `fk_place_path_record10` FOREIGN KEY (`id`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
943
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
944
/*!40101 SET character_set_client = @saved_cs_client */;
945

    
946
--
947
-- Dumping data for table `stratum`
948
--
949

    
950
/*!40000 ALTER TABLE `stratum` DISABLE KEYS */;
951
/*!40000 ALTER TABLE `stratum` ENABLE KEYS */;
952

    
953
--
954
-- Table structure for table `subplot`
955
--
956

    
957
/*!40101 SET @saved_cs_client     = @@character_set_client */;
958
/*!40101 SET character_set_client = utf8 */;
959
CREATE TABLE `subplot` (
960
  `id` varbinary(767) NOT NULL,
961
  PRIMARY KEY (`id`),
962
  CONSTRAINT `fk_subplot_plot1` FOREIGN KEY (`id`) REFERENCES `plot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
963
  CONSTRAINT `fk_subplot_plot_element1` FOREIGN KEY (`id`) REFERENCES `plot_element` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
964
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
965
/*!40101 SET character_set_client = @saved_cs_client */;
966

    
967
--
968
-- Dumping data for table `subplot`
969
--
970

    
971
/*!40000 ALTER TABLE `subplot` DISABLE KEYS */;
972
/*!40000 ALTER TABLE `subplot` ENABLE KEYS */;
973

    
974
--
975
-- Table structure for table `taxon_absence`
976
--
977

    
978
/*!40101 SET @saved_cs_client     = @@character_set_client */;
979
/*!40101 SET character_set_client = utf8 */;
980
CREATE TABLE `taxon_absence` (
981
  `id` varbinary(767) NOT NULL,
982
  PRIMARY KEY (`id`),
983
  CONSTRAINT `fk_taxon_absence_taxon_determination1` FOREIGN KEY (`id`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
984
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation that a [[VegCore#Taxon|Taxon]]''s does _not_ exist in a place';
985
/*!40101 SET character_set_client = @saved_cs_client */;
986

    
987
--
988
-- Dumping data for table `taxon_absence`
989
--
990

    
991
/*!40000 ALTER TABLE `taxon_absence` DISABLE KEYS */;
992
/*!40000 ALTER TABLE `taxon_absence` ENABLE KEYS */;
993

    
994
--
995
-- Table structure for table `taxon_assertion`
996
--
997

    
998
/*!40101 SET @saved_cs_client     = @@character_set_client */;
999
/*!40101 SET character_set_client = utf8 */;
1000
CREATE TABLE `taxon_assertion` (
1001
  `id` varbinary(767) NOT NULL,
1002
  `string` varbinary(767) NOT NULL COMMENT 'for parsed_taxon_assertion, this is the TNRS input name, not the concatenated matched name',
1003
  `taxon` varbinary(767) DEFAULT NULL,
1004
  `cf_aff` varbinary(767) DEFAULT NULL,
1005
  `annotations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1006
  PRIMARY KEY (`id`),
1007
  KEY `fk_taxon_assertion_taxon_string1_idx` (`string`),
1008
  KEY `fk_taxon_assertion_taxon_name1_idx` (`taxon`),
1009
  CONSTRAINT `fk_qualified_taxon_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1010
  CONSTRAINT `fk_taxon_assertion_taxon_string1` FOREIGN KEY (`string`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE,
1011
  CONSTRAINT `fk_taxon_assertion_taxon_name1` FOREIGN KEY (`taxon`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1012
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
1013
/*!40101 SET character_set_client = @saved_cs_client */;
1014

    
1015
--
1016
-- Dumping data for table `taxon_assertion`
1017
--
1018

    
1019
/*!40000 ALTER TABLE `taxon_assertion` DISABLE KEYS */;
1020
/*!40000 ALTER TABLE `taxon_assertion` ENABLE KEYS */;
1021

    
1022
--
1023
-- Table structure for table `taxon_concept`
1024
--
1025

    
1026
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1027
/*!40101 SET character_set_client = utf8 */;
1028
CREATE TABLE `taxon_concept` (
1029
  `id` varbinary(767) NOT NULL,
1030
  `according_to` varbinary(767) NOT NULL,
1031
  `parent` varbinary(767) DEFAULT NULL,
1032
  `accepted_taxon_concept` varbinary(767) DEFAULT NULL,
1033
  PRIMARY KEY (`id`),
1034
  UNIQUE KEY `taxon_concept_unique_name` (`according_to`),
1035
  KEY `fk_taxon_taxon1_idx` (`parent`),
1036
  KEY `fk_taxon_concept_source1_idx` (`according_to`),
1037
  KEY `fk_taxon_concept_taxon_concept1_idx` (`accepted_taxon_concept`),
1038
  CONSTRAINT `fk_taxon_taxon1` FOREIGN KEY (`parent`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1039
  CONSTRAINT `fk_taxon_concept_source1` FOREIGN KEY (`according_to`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1040
  CONSTRAINT `fk_taxon_concept_taxon_concept1` FOREIGN KEY (`accepted_taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1041
  CONSTRAINT `fk_taxon_concept_taxon_name1` FOREIGN KEY (`id`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1042
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A [[VegCore#Taxon|Taxon]] described by a specific [[VegCore#Reference|Reference]]';
1043
/*!40101 SET character_set_client = @saved_cs_client */;
1044

    
1045
--
1046
-- Dumping data for table `taxon_concept`
1047
--
1048

    
1049
/*!40000 ALTER TABLE `taxon_concept` DISABLE KEYS */;
1050
/*!40000 ALTER TABLE `taxon_concept` ENABLE KEYS */;
1051

    
1052
--
1053
-- Table structure for table `taxon_determination`
1054
--
1055

    
1056
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1057
/*!40101 SET character_set_client = utf8 */;
1058
CREATE TABLE `taxon_determination` (
1059
  `id` varbinary(767) NOT NULL,
1060
  `identified_by` varbinary(767) DEFAULT NULL,
1061
  `taxon_assertion` varbinary(767) NOT NULL,
1062
  `fit_info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1063
  PRIMARY KEY (`id`),
1064
  UNIQUE KEY `taxon_determination_unique` (`taxon_assertion`,`identified_by`),
1065
  KEY `fk_taxon_occurrence_has_qualified_taxon1_idx` (`taxon_assertion`),
1066
  KEY `fk_taxon_determination_party_list1_idx` (`identified_by`),
1067
  CONSTRAINT `fk_taxon_occurrence_has_qualified_taxon1` FOREIGN KEY (`taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1068
  CONSTRAINT `fk_taxon_determination_party_list1` FOREIGN KEY (`identified_by`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1069
  CONSTRAINT `fk_taxon_determination_taxon_observation1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1070
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An assertion that a [[VegCore#TaxonOccurrence|TaxonOccurrence]] is a particular [[VegCore#Taxon|Taxon]]';
1071
/*!40101 SET character_set_client = @saved_cs_client */;
1072

    
1073
--
1074
-- Dumping data for table `taxon_determination`
1075
--
1076

    
1077
/*!40000 ALTER TABLE `taxon_determination` DISABLE KEYS */;
1078
/*!40000 ALTER TABLE `taxon_determination` ENABLE KEYS */;
1079

    
1080
--
1081
-- Table structure for table `taxon_name`
1082
--
1083

    
1084
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1085
/*!40101 SET character_set_client = utf8 */;
1086
CREATE TABLE `taxon_name` (
1087
  `id` varbinary(767) NOT NULL,
1088
  `unique_name` varbinary(767) NOT NULL,
1089
  `formal_name` varbinary(767) DEFAULT NULL,
1090
  `taxon_name` varbinary(767) DEFAULT NULL,
1091
  `author` varbinary(767) DEFAULT NULL,
1092
  `common_name` varbinary(767) DEFAULT NULL,
1093
  `rank` varbinary(767) DEFAULT NULL,
1094
  `taxon_path` varbinary(767) DEFAULT NULL,
1095
  PRIMARY KEY (`id`),
1096
  KEY `fk_taxon_concept_taxon_string10_idx` (`unique_name`),
1097
  KEY `fk_taxon_name_taxon_path1_idx` (`taxon_path`),
1098
  CONSTRAINT `fk_taxon_record10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1099
  CONSTRAINT `fk_taxon_concept_taxon_string10` FOREIGN KEY (`unique_name`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE,
1100
  CONSTRAINT `fk_taxon_name_taxon_path1` FOREIGN KEY (`taxon_path`) REFERENCES `taxon_path` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1101
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
1102
/*!40101 SET character_set_client = @saved_cs_client */;
1103

    
1104
--
1105
-- Dumping data for table `taxon_name`
1106
--
1107

    
1108
/*!40000 ALTER TABLE `taxon_name` DISABLE KEYS */;
1109
/*!40000 ALTER TABLE `taxon_name` ENABLE KEYS */;
1110

    
1111
--
1112
-- Table structure for table `taxon_observation`
1113
--
1114

    
1115
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1116
/*!40101 SET character_set_client = utf8 */;
1117
CREATE TABLE `taxon_observation` (
1118
  `id` varbinary(767) NOT NULL,
1119
  `collectors` varbinary(767) DEFAULT NULL,
1120
  `collector_number` varbinary(767) DEFAULT NULL,
1121
  `voucher` varbinary(767) DEFAULT NULL,
1122
  `growth_form` varbinary(767) DEFAULT NULL,
1123
  `cultivated` tinyint(1) DEFAULT NULL,
1124
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1125
  PRIMARY KEY (`id`),
1126
  KEY `fk_taxon_observation_specimen1_idx` (`voucher`),
1127
  KEY `fk_taxon_observation_party_list1_idx` (`collectors`),
1128
  CONSTRAINT `fk_taxon_observation_party_list1` FOREIGN KEY (`collectors`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1129
  CONSTRAINT `fk_taxon_observation_sampling_event1` FOREIGN KEY (`id`) REFERENCES `sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1130
  CONSTRAINT `fk_taxon_observation_specimen1` FOREIGN KEY (`voucher`) REFERENCES `specimen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1131
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
1132
/*!40101 SET character_set_client = @saved_cs_client */;
1133

    
1134
--
1135
-- Dumping data for table `taxon_observation`
1136
--
1137

    
1138
/*!40000 ALTER TABLE `taxon_observation` DISABLE KEYS */;
1139
/*!40000 ALTER TABLE `taxon_observation` ENABLE KEYS */;
1140

    
1141
--
1142
-- Table structure for table `taxon_path`
1143
--
1144

    
1145
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1146
/*!40101 SET character_set_client = utf8 */;
1147
CREATE TABLE `taxon_path` (
1148
  `id` varbinary(767) NOT NULL,
1149
  `family` varbinary(767) DEFAULT NULL,
1150
  `genus` varbinary(767) DEFAULT NULL,
1151
  `specific_epithet` varbinary(767) DEFAULT NULL,
1152
  `ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1153
  PRIMARY KEY (`id`)
1154
) 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)';
1155
/*!40101 SET character_set_client = @saved_cs_client */;
1156

    
1157
--
1158
-- Dumping data for table `taxon_path`
1159
--
1160

    
1161
/*!40000 ALTER TABLE `taxon_path` DISABLE KEYS */;
1162
/*!40000 ALTER TABLE `taxon_path` ENABLE KEYS */;
1163

    
1164
--
1165
-- Table structure for table `taxon_presence`
1166
--
1167

    
1168
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1169
/*!40101 SET character_set_client = utf8 */;
1170
CREATE TABLE `taxon_presence` (
1171
  `id` varbinary(767) NOT NULL,
1172
  `occurrence_status` varbinary(767) DEFAULT NULL,
1173
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1174
  PRIMARY KEY (`id`),
1175
  CONSTRAINT `fk_taxon_presence_taxon_determination1` FOREIGN KEY (`id`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1176
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of just a [[VegCore#Taxon|Taxon]]''s _presence_';
1177
/*!40101 SET character_set_client = @saved_cs_client */;
1178

    
1179
--
1180
-- Dumping data for table `taxon_presence`
1181
--
1182

    
1183
/*!40000 ALTER TABLE `taxon_presence` DISABLE KEYS */;
1184
/*!40000 ALTER TABLE `taxon_presence` ENABLE KEYS */;
1185

    
1186
--
1187
-- Table structure for table `taxon_scrub`
1188
--
1189

    
1190
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1191
/*!40101 SET character_set_client = utf8 */;
1192
CREATE TABLE `taxon_scrub` (
1193
  `id` varbinary(767) NOT NULL,
1194
  `input_string` varbinary(767) NOT NULL,
1195
  `parsed_taxon_assertion` varbinary(767) NOT NULL,
1196
  `matched_taxon_concept` varbinary(767) DEFAULT NULL,
1197
  `match_score` float DEFAULT NULL,
1198
  `match_info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1199
  PRIMARY KEY (`id`),
1200
  KEY `fk_parsed_taxon_assertion_taxon_name1_idx` (`matched_taxon_concept`),
1201
  KEY `fk_taxon_scrub_taxon_assertion1_idx` (`parsed_taxon_assertion`),
1202
  KEY `fk_taxon_scrub_taxon_string1_idx` (`input_string`),
1203
  CONSTRAINT `fk_parsed_taxon_assertion_taxon_name1` FOREIGN KEY (`matched_taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1204
  CONSTRAINT `fk_taxon_scrub_taxon_assertion1` FOREIGN KEY (`parsed_taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1205
  CONSTRAINT `fk_taxon_scrub_taxon_string1` FOREIGN KEY (`input_string`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE,
1206
  CONSTRAINT `fk_taxon_scrub_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1207
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
1208
/*!40101 SET character_set_client = @saved_cs_client */;
1209

    
1210
--
1211
-- Dumping data for table `taxon_scrub`
1212
--
1213

    
1214
/*!40000 ALTER TABLE `taxon_scrub` DISABLE KEYS */;
1215
/*!40000 ALTER TABLE `taxon_scrub` ENABLE KEYS */;
1216

    
1217
--
1218
-- Table structure for table `taxon_string`
1219
--
1220

    
1221
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1222
/*!40101 SET character_set_client = utf8 */;
1223
CREATE TABLE `taxon_string` (
1224
  `string` varbinary(767) NOT NULL,
1225
  PRIMARY KEY (`string`)
1226
) 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)';
1227
/*!40101 SET character_set_client = @saved_cs_client */;
1228

    
1229
--
1230
-- Dumping data for table `taxon_string`
1231
--
1232

    
1233
/*!40000 ALTER TABLE `taxon_string` DISABLE KEYS */;
1234
/*!40000 ALTER TABLE `taxon_string` ENABLE KEYS */;
1235
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
1236

    
1237
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
1238
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
1239
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
1240
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
1241
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
1242
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1243
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
1244

    
1245
-- Dump completed
(9-9/15)