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
  `official_name` varbinary(767) DEFAULT NULL,
219
  PRIMARY KEY (`id`),
220
  CONSTRAINT `fk_geoplace_place1` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
221
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A numerically-defined point';
222
/*!40101 SET character_set_client = @saved_cs_client */;
223

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

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

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

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

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

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

    
261
--
262
-- Table structure for table `geovalidatable_place`
263
--
264

    
265
/*!40101 SET @saved_cs_client     = @@character_set_client */;
266
/*!40101 SET character_set_client = utf8 */;
267
CREATE TABLE `geovalidatable_place` (
268
  `id` varbinary(767) NOT NULL,
269
  `parent_geoplace` varbinary(767) NOT NULL,
270
  PRIMARY KEY (`id`),
271
  KEY `fk_geovalidatable_place_geoplace1_idx` (`parent_geoplace`),
272
  CONSTRAINT `fk_geovalidatable_place_geoplace1` FOREIGN KEY (`parent_geoplace`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
273
  CONSTRAINT `fk_nested_geoplace_geoplace1` FOREIGN KEY (`id`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
274
) 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)';
275
/*!40101 SET character_set_client = @saved_cs_client */;
276

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

    
281
/*!40000 ALTER TABLE `geovalidatable_place` DISABLE KEYS */;
282
/*!40000 ALTER TABLE `geovalidatable_place` 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
  `corrected_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` (`corrected_geoplace`),
300
  CONSTRAINT `fk_geovalidation_geoplace1` FOREIGN KEY (`input_geoplace`) REFERENCES `geovalidatable_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
301
  CONSTRAINT `fk_geovalidation_geoplace2` FOREIGN KEY (`corrected_geoplace`) REFERENCES `geovalidatable_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
302
  CONSTRAINT `fk_geovalidation_georeferencing1` FOREIGN KEY (`id`) REFERENCES `georeferencing` (`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
  `place` varbinary(767) NOT NULL,
322
  `tag` varbinary(767) DEFAULT NULL,
323
  `tag_history` set('hstore') COLLATE utf8_bin DEFAULT NULL,
324
  PRIMARY KEY (`id`),
325
  KEY `fk_individual_place1_idx` (`place`),
326
  CONSTRAINT `fk_individual_record1` FOREIGN KEY (`id`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
327
  CONSTRAINT `fk_individual_place1` FOREIGN KEY (`place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
328
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A distinct biological organism';
329
/*!40101 SET character_set_client = @saved_cs_client */;
330

    
331
--
332
-- Dumping data for table `individual`
333
--
334

    
335
/*!40000 ALTER TABLE `individual` DISABLE KEYS */;
336
/*!40000 ALTER TABLE `individual` ENABLE KEYS */;
337

    
338
--
339
-- Table structure for table `individual_observation`
340
--
341

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

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

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

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

    
367
/*!40101 SET @saved_cs_client     = @@character_set_client */;
368
/*!40101 SET character_set_client = utf8 */;
369
CREATE TABLE `method` (
370
  `id` varbinary(767) NOT NULL,
371
  `parent` varbinary(767) NOT NULL,
372
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
373
  PRIMARY KEY (`id`),
374
  KEY `fk_method_method1_idx` (`parent`),
375
  CONSTRAINT `fk_method_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
376
  CONSTRAINT `fk_method_method1` FOREIGN KEY (`parent`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
377
) 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)';
378
/*!40101 SET character_set_client = @saved_cs_client */;
379

    
380
--
381
-- Dumping data for table `method`
382
--
383

    
384
/*!40000 ALTER TABLE `method` DISABLE KEYS */;
385
/*!40000 ALTER TABLE `method` ENABLE KEYS */;
386

    
387
--
388
-- Table structure for table `organization`
389
--
390

    
391
/*!40101 SET @saved_cs_client     = @@character_set_client */;
392
/*!40101 SET character_set_client = utf8 */;
393
CREATE TABLE `organization` (
394
  `id` varbinary(767) NOT NULL,
395
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
396
  PRIMARY KEY (`id`),
397
  CONSTRAINT `fk_organization_party1` FOREIGN KEY (`id`) REFERENCES `party` (`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 `organization`
403
--
404

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

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

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

    
425
--
426
-- Dumping data for table `party`
427
--
428

    
429
/*!40000 ALTER TABLE `party` DISABLE KEYS */;
430
/*!40000 ALTER TABLE `party` ENABLE KEYS */;
431

    
432
--
433
-- Table structure for table `party_list`
434
--
435

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

    
446
--
447
-- Dumping data for table `party_list`
448
--
449

    
450
/*!40000 ALTER TABLE `party_list` DISABLE KEYS */;
451
/*!40000 ALTER TABLE `party_list` ENABLE KEYS */;
452

    
453
--
454
-- Table structure for table `party_list_entry`
455
--
456

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

    
471
--
472
-- Dumping data for table `party_list_entry`
473
--
474

    
475
/*!40000 ALTER TABLE `party_list_entry` DISABLE KEYS */;
476
/*!40000 ALTER TABLE `party_list_entry` ENABLE KEYS */;
477

    
478
--
479
-- Table structure for table `place`
480
--
481

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

    
501
--
502
-- Dumping data for table `place`
503
--
504

    
505
/*!40000 ALTER TABLE `place` DISABLE KEYS */;
506
/*!40000 ALTER TABLE `place` ENABLE KEYS */;
507

    
508
--
509
-- Table structure for table `place_observation`
510
--
511

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

    
534
--
535
-- Dumping data for table `place_observation`
536
--
537

    
538
/*!40000 ALTER TABLE `place_observation` DISABLE KEYS */;
539
/*!40000 ALTER TABLE `place_observation` ENABLE KEYS */;
540

    
541
--
542
-- Table structure for table `plot`
543
--
544

    
545
/*!40101 SET @saved_cs_client     = @@character_set_client */;
546
/*!40101 SET character_set_client = utf8 */;
547
CREATE TABLE `plot` (
548
  `id` varbinary(767) NOT NULL,
549
  `name` varbinary(767) DEFAULT NULL,
550
  `area_m2` double DEFAULT NULL,
551
  `shape` varbinary(767) DEFAULT NULL,
552
  `length_m` varbinary(767) DEFAULT NULL,
553
  `width_m` varbinary(767) DEFAULT NULL,
554
  `azimuth_deg_N` varbinary(767) DEFAULT NULL,
555
  `footprint_geom_WKT` varbinary(767) DEFAULT NULL,
556
  `dimensions` set('hstore') COLLATE utf8_bin DEFAULT NULL,
557
  PRIMARY KEY (`id`),
558
  CONSTRAINT `fk_subplot_place1` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
559
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
560
/*!40101 SET character_set_client = @saved_cs_client */;
561

    
562
--
563
-- Dumping data for table `plot`
564
--
565

    
566
/*!40000 ALTER TABLE `plot` DISABLE KEYS */;
567
/*!40000 ALTER TABLE `plot` ENABLE KEYS */;
568

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

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

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

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

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

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

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

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

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

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

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

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

    
637
--
638
-- Table structure for table `relationship`
639
--
640

    
641
/*!40101 SET @saved_cs_client     = @@character_set_client */;
642
/*!40101 SET character_set_client = utf8 */;
643
CREATE TABLE `relationship` (
644
  `id` varbinary(767) NOT NULL,
645
  `record` varbinary(767) NOT NULL,
646
  `related_record` varbinary(767) NOT NULL,
647
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
648
  PRIMARY KEY (`id`),
649
  KEY `fk_relationship_record1_idx` (`record`),
650
  KEY `fk_relationship_related_record_idx` (`related_record`),
651
  CONSTRAINT `fk_relationship_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
652
  CONSTRAINT `fk_relationship_record2` FOREIGN KEY (`record`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
653
  CONSTRAINT `fk_relationship_related_record` FOREIGN KEY (`related_record`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
654
) 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)';
655
/*!40101 SET character_set_client = @saved_cs_client */;
656

    
657
--
658
-- Dumping data for table `relationship`
659
--
660

    
661
/*!40000 ALTER TABLE `relationship` DISABLE KEYS */;
662
/*!40000 ALTER TABLE `relationship` ENABLE KEYS */;
663

    
664
--
665
-- Table structure for table `reobservable`
666
--
667

    
668
/*!40101 SET @saved_cs_client     = @@character_set_client */;
669
/*!40101 SET character_set_client = utf8 */;
670
CREATE TABLE `reobservable` (
671
  `id` varbinary(767) NOT NULL,
672
  `current_determination` varbinary(767) DEFAULT NULL,
673
  `original_determination` varbinary(767) DEFAULT NULL,
674
  PRIMARY KEY (`id`),
675
  KEY `fk_taxon_occurrence_taxon_determination1_idx` (`original_determination`),
676
  KEY `fk_taxon_occurrence_taxon_determination2_idx` (`current_determination`),
677
  CONSTRAINT `fk_taxon_occurrence_taxon_determination1` FOREIGN KEY (`original_determination`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
678
  CONSTRAINT `fk_taxon_occurrence_taxon_determination2` FOREIGN KEY (`current_determination`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
679
  CONSTRAINT `fk_taxon_occurrence_event1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
680
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Any entity on which [[VegCore#TaxonDetermination|TaxonDetermination]]s can be made';
681
/*!40101 SET character_set_client = @saved_cs_client */;
682

    
683
--
684
-- Dumping data for table `reobservable`
685
--
686

    
687
/*!40000 ALTER TABLE `reobservable` DISABLE KEYS */;
688
/*!40000 ALTER TABLE `reobservable` ENABLE KEYS */;
689

    
690
--
691
-- Table structure for table `sampling_event`
692
--
693

    
694
/*!40101 SET @saved_cs_client     = @@character_set_client */;
695
/*!40101 SET character_set_client = utf8 */;
696
CREATE TABLE `sampling_event` (
697
  `id` varbinary(767) NOT NULL,
698
  `method` varbinary(767) DEFAULT NULL,
699
  PRIMARY KEY (`id`),
700
  KEY `fk_sampling_event_method1_idx` (`method`),
701
  CONSTRAINT `fk_sampling_event_method1` FOREIGN KEY (`method`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
702
  CONSTRAINT `fk_project_event10` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
703
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
704
/*!40101 SET character_set_client = @saved_cs_client */;
705

    
706
--
707
-- Dumping data for table `sampling_event`
708
--
709

    
710
/*!40000 ALTER TABLE `sampling_event` DISABLE KEYS */;
711
/*!40000 ALTER TABLE `sampling_event` ENABLE KEYS */;
712

    
713
--
714
-- Table structure for table `soil_observation`
715
--
716

    
717
/*!40101 SET @saved_cs_client     = @@character_set_client */;
718
/*!40101 SET character_set_client = utf8 */;
719
CREATE TABLE `soil_observation` (
720
  `id` varbinary(767) NOT NULL,
721
  `observations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
722
  PRIMARY KEY (`id`),
723
  CONSTRAINT `fk_soil_observation_place_observation1` FOREIGN KEY (`id`) REFERENCES `place_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
724
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]''s soil';
725
/*!40101 SET character_set_client = @saved_cs_client */;
726

    
727
--
728
-- Dumping data for table `soil_observation`
729
--
730

    
731
/*!40000 ALTER TABLE `soil_observation` DISABLE KEYS */;
732
/*!40000 ALTER TABLE `soil_observation` ENABLE KEYS */;
733

    
734
--
735
-- Table structure for table `source`
736
--
737

    
738
/*!40101 SET @saved_cs_client     = @@character_set_client */;
739
/*!40101 SET character_set_client = utf8 */;
740
CREATE TABLE `source` (
741
  `id` varbinary(767) NOT NULL,
742
  `parent` varbinary(767) DEFAULT NULL,
743
  `name` varbinary(767) NOT NULL,
744
  `first_publisher` varbinary(767) DEFAULT NULL,
745
  `owner` varbinary(767) DEFAULT NULL,
746
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
747
  PRIMARY KEY (`id`),
748
  UNIQUE KEY `source_unique` (`parent`,`name`),
749
  KEY `fk_source1_idx` (`parent`),
750
  KEY `fk_source_party1_idx` (`owner`),
751
  KEY `fk_source_party2_idx` (`first_publisher`),
752
  CONSTRAINT `fk_source1` FOREIGN KEY (`parent`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
753
  CONSTRAINT `fk_source_party1` FOREIGN KEY (`owner`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
754
  CONSTRAINT `fk_source_party2` FOREIGN KEY (`first_publisher`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
755
) 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)';
756
/*!40101 SET character_set_client = @saved_cs_client */;
757

    
758
--
759
-- Dumping data for table `source`
760
--
761

    
762
/*!40000 ALTER TABLE `source` DISABLE KEYS */;
763
/*!40000 ALTER TABLE `source` ENABLE KEYS */;
764

    
765
--
766
-- Table structure for table `specimen`
767
--
768

    
769
/*!40101 SET @saved_cs_client     = @@character_set_client */;
770
/*!40101 SET character_set_client = utf8 */;
771
CREATE TABLE `specimen` (
772
  `id` varbinary(767) NOT NULL,
773
  `individual` varbinary(767) DEFAULT NULL,
774
  `code_in_individual` varbinary(767) DEFAULT NULL,
775
  `collection_event` varbinary(767) DEFAULT NULL,
776
  `orig_collection` varbinary(767) DEFAULT NULL,
777
  `barcode` varbinary(767) DEFAULT NULL,
778
  `accession_number` varbinary(767) DEFAULT NULL,
779
  `specimenholder_institutions` varbinary(767) DEFAULT NULL,
780
  `current_collection` varbinary(767) DEFAULT NULL,
781
  `owner_collection` varbinary(767) DEFAULT NULL,
782
  PRIMARY KEY (`id`),
783
  UNIQUE KEY `specimen_unique_in_individual` (`individual`,`code_in_individual`),
784
  UNIQUE KEY `specimen_unique_by_collection_event` (`collection_event`),
785
  UNIQUE KEY `specimen_unique_in_collection_by_barcode` (`orig_collection`,`barcode`),
786
  UNIQUE KEY `specimen_unique_in_collection_by_accession_number` (`orig_collection`,`accession_number`),
787
  KEY `fk_specimen_collection1_idx` (`orig_collection`),
788
  KEY `fk_specimen_taxon_observation1_idx` (`collection_event`),
789
  KEY `fk_specimen_individual1_idx` (`individual`),
790
  KEY `fk_specimen_collection2_idx` (`current_collection`),
791
  KEY `fk_specimen_organization3_idx` (`owner_collection`),
792
  KEY `fk_specimen_party_list1_idx` (`specimenholder_institutions`),
793
  CONSTRAINT `fk_specimen_organization3` FOREIGN KEY (`owner_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
794
  CONSTRAINT `fk_specimen_taxon_observation1` FOREIGN KEY (`collection_event`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
795
  CONSTRAINT `fk_specimen_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
796
  CONSTRAINT `fk_specimen_collection2` FOREIGN KEY (`current_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
797
  CONSTRAINT `fk_specimen_party_list1` FOREIGN KEY (`specimenholder_institutions`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
798
  CONSTRAINT `fk_specimen_collection1` FOREIGN KEY (`orig_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
799
  CONSTRAINT `fk_specimen_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
800
) 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';
801
/*!40101 SET character_set_client = @saved_cs_client */;
802

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

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

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

    
814
/*!40101 SET @saved_cs_client     = @@character_set_client */;
815
/*!40101 SET character_set_client = utf8 */;
816
CREATE TABLE `specimen_observation` (
817
  `id` varbinary(767) NOT NULL,
818
  `specimen` varbinary(767) NOT NULL,
819
  `description` varbinary(767) DEFAULT NULL,
820
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
821
  PRIMARY KEY (`id`),
822
  KEY `fk_specimen_observation_specimen1_idx` (`specimen`),
823
  CONSTRAINT `fk_specimen_taxon_occurrence10` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
824
  CONSTRAINT `fk_specimen_observation_specimen1` FOREIGN KEY (`specimen`) REFERENCES `specimen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
825
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
826
/*!40101 SET character_set_client = @saved_cs_client */;
827

    
828
--
829
-- Dumping data for table `specimen_observation`
830
--
831

    
832
/*!40000 ALTER TABLE `specimen_observation` DISABLE KEYS */;
833
/*!40000 ALTER TABLE `specimen_observation` ENABLE KEYS */;
834

    
835
--
836
-- Table structure for table `stem`
837
--
838

    
839
/*!40101 SET @saved_cs_client     = @@character_set_client */;
840
/*!40101 SET character_set_client = utf8 */;
841
CREATE TABLE `stem` (
842
  `id` varbinary(767) NOT NULL,
843
  `individual` varbinary(767) DEFAULT NULL,
844
  PRIMARY KEY (`id`),
845
  KEY `fk_stem_individual1_idx` (`individual`),
846
  CONSTRAINT `fk_stem_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
847
  CONSTRAINT `fk_stem_individual2` FOREIGN KEY (`id`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
848
) 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)';
849
/*!40101 SET character_set_client = @saved_cs_client */;
850

    
851
--
852
-- Dumping data for table `stem`
853
--
854

    
855
/*!40000 ALTER TABLE `stem` DISABLE KEYS */;
856
/*!40000 ALTER TABLE `stem` ENABLE KEYS */;
857

    
858
--
859
-- Table structure for table `stem_observation`
860
--
861

    
862
/*!40101 SET @saved_cs_client     = @@character_set_client */;
863
/*!40101 SET character_set_client = utf8 */;
864
CREATE TABLE `stem_observation` (
865
  `id` varbinary(767) NOT NULL,
866
  `individual_observation` varbinary(767) DEFAULT NULL,
867
  `stem` varbinary(767) DEFAULT NULL,
868
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
869
  PRIMARY KEY (`id`),
870
  UNIQUE KEY `stem_observation_unique` (`individual_observation`,`stem`),
871
  KEY `fk_stem_observation_individual_observation1_idx` (`individual_observation`),
872
  KEY `fk_stem_observation_stem1_idx` (`stem`),
873
  CONSTRAINT `fk_stem_observation_stem1` FOREIGN KEY (`stem`) REFERENCES `stem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
874
  CONSTRAINT `fk_stem_observation_individual_observation1` FOREIGN KEY (`individual_observation`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
875
  CONSTRAINT `fk_stem_observation_individual_observation2` FOREIGN KEY (`id`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
876
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of a [[VegCore#Stem|Stem]]';
877
/*!40101 SET character_set_client = @saved_cs_client */;
878

    
879
--
880
-- Dumping data for table `stem_observation`
881
--
882

    
883
/*!40000 ALTER TABLE `stem_observation` DISABLE KEYS */;
884
/*!40000 ALTER TABLE `stem_observation` ENABLE KEYS */;
885

    
886
--
887
-- Table structure for table `stratum`
888
--
889

    
890
/*!40101 SET @saved_cs_client     = @@character_set_client */;
891
/*!40101 SET character_set_client = utf8 */;
892
CREATE TABLE `stratum` (
893
  `id` varbinary(767) NOT NULL,
894
  `name` varbinary(767) NOT NULL,
895
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
896
  PRIMARY KEY (`id`),
897
  CONSTRAINT `fk_place_path_record10` FOREIGN KEY (`id`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
898
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
899
/*!40101 SET character_set_client = @saved_cs_client */;
900

    
901
--
902
-- Dumping data for table `stratum`
903
--
904

    
905
/*!40000 ALTER TABLE `stratum` DISABLE KEYS */;
906
/*!40000 ALTER TABLE `stratum` ENABLE KEYS */;
907

    
908
--
909
-- Table structure for table `subplace`
910
--
911

    
912
/*!40101 SET @saved_cs_client     = @@character_set_client */;
913
/*!40101 SET character_set_client = utf8 */;
914
CREATE TABLE `subplace` (
915
  `id` varbinary(767) NOT NULL,
916
  `parent` varbinary(767) NOT NULL,
917
  `x_m` double DEFAULT NULL,
918
  `y_m` double DEFAULT NULL,
919
  `coords` set('hstore') COLLATE utf8_bin DEFAULT NULL,
920
  PRIMARY KEY (`id`),
921
  KEY `fk_rel_place_place1_idx` (`parent`),
922
  CONSTRAINT `fk_subplot_place2` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
923
  CONSTRAINT `fk_rel_place_place1` FOREIGN KEY (`parent`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
924
) 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))';
925
/*!40101 SET character_set_client = @saved_cs_client */;
926

    
927
--
928
-- Dumping data for table `subplace`
929
--
930

    
931
/*!40000 ALTER TABLE `subplace` DISABLE KEYS */;
932
/*!40000 ALTER TABLE `subplace` ENABLE KEYS */;
933

    
934
--
935
-- Table structure for table `subplot`
936
--
937

    
938
/*!40101 SET @saved_cs_client     = @@character_set_client */;
939
/*!40101 SET character_set_client = utf8 */;
940
CREATE TABLE `subplot` (
941
  `id` varbinary(767) NOT NULL,
942
  `parent_plot` varbinary(767) NOT NULL,
943
  PRIMARY KEY (`id`),
944
  KEY `fk_subplot_plot2_idx` (`parent_plot`),
945
  CONSTRAINT `fk_subplot_plot1` FOREIGN KEY (`id`) REFERENCES `plot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
946
  CONSTRAINT `fk_subplot_plot2` FOREIGN KEY (`parent_plot`) REFERENCES `plot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
947
  CONSTRAINT `fk_subplot_rel_place1` FOREIGN KEY (`id`) REFERENCES `subplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
948
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
949
/*!40101 SET character_set_client = @saved_cs_client */;
950

    
951
--
952
-- Dumping data for table `subplot`
953
--
954

    
955
/*!40000 ALTER TABLE `subplot` DISABLE KEYS */;
956
/*!40000 ALTER TABLE `subplot` ENABLE KEYS */;
957

    
958
--
959
-- Table structure for table `taxon_absence`
960
--
961

    
962
/*!40101 SET @saved_cs_client     = @@character_set_client */;
963
/*!40101 SET character_set_client = utf8 */;
964
CREATE TABLE `taxon_absence` (
965
  `id` varbinary(767) NOT NULL,
966
  PRIMARY KEY (`id`),
967
  CONSTRAINT `fk_taxon_absence_taxon_determination1` FOREIGN KEY (`id`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
968
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation that a [[VegCore#Taxon|Taxon]]''s does _not_ exist in a place';
969
/*!40101 SET character_set_client = @saved_cs_client */;
970

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

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

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

    
982
/*!40101 SET @saved_cs_client     = @@character_set_client */;
983
/*!40101 SET character_set_client = utf8 */;
984
CREATE TABLE `taxon_assertion` (
985
  `id` varbinary(767) NOT NULL,
986
  `string` varbinary(767) NOT NULL COMMENT 'for parsed_taxon_assertion, this is the TNRS input name, not the concatenated matched name',
987
  `taxon` varbinary(767) DEFAULT NULL,
988
  `cf_aff` varbinary(767) DEFAULT NULL,
989
  `annotations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
990
  PRIMARY KEY (`id`),
991
  KEY `fk_taxon_assertion_taxon_string1_idx` (`string`),
992
  KEY `fk_taxon_assertion_taxon_name1_idx` (`taxon`),
993
  CONSTRAINT `fk_qualified_taxon_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
994
  CONSTRAINT `fk_taxon_assertion_taxon_string1` FOREIGN KEY (`string`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE,
995
  CONSTRAINT `fk_taxon_assertion_taxon_name1` FOREIGN KEY (`taxon`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
996
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
997
/*!40101 SET character_set_client = @saved_cs_client */;
998

    
999
--
1000
-- Dumping data for table `taxon_assertion`
1001
--
1002

    
1003
/*!40000 ALTER TABLE `taxon_assertion` DISABLE KEYS */;
1004
/*!40000 ALTER TABLE `taxon_assertion` ENABLE KEYS */;
1005

    
1006
--
1007
-- Table structure for table `taxon_concept`
1008
--
1009

    
1010
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1011
/*!40101 SET character_set_client = utf8 */;
1012
CREATE TABLE `taxon_concept` (
1013
  `id` varbinary(767) NOT NULL,
1014
  `according_to` varbinary(767) NOT NULL,
1015
  `parent` varbinary(767) DEFAULT NULL,
1016
  `accepted_taxon_concept` varbinary(767) DEFAULT NULL,
1017
  PRIMARY KEY (`id`),
1018
  UNIQUE KEY `taxon_concept_unique_name` (`according_to`),
1019
  KEY `fk_taxon_taxon1_idx` (`parent`),
1020
  KEY `fk_taxon_concept_source1_idx` (`according_to`),
1021
  KEY `fk_taxon_concept_taxon_concept1_idx` (`accepted_taxon_concept`),
1022
  CONSTRAINT `fk_taxon_taxon1` FOREIGN KEY (`parent`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1023
  CONSTRAINT `fk_taxon_concept_source1` FOREIGN KEY (`according_to`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1024
  CONSTRAINT `fk_taxon_concept_taxon_concept1` FOREIGN KEY (`accepted_taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1025
  CONSTRAINT `fk_taxon_concept_taxon_name1` FOREIGN KEY (`id`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1026
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A [[VegCore#Taxon|Taxon]] described by a specific [[VegCore#Reference|Reference]]';
1027
/*!40101 SET character_set_client = @saved_cs_client */;
1028

    
1029
--
1030
-- Dumping data for table `taxon_concept`
1031
--
1032

    
1033
/*!40000 ALTER TABLE `taxon_concept` DISABLE KEYS */;
1034
/*!40000 ALTER TABLE `taxon_concept` ENABLE KEYS */;
1035

    
1036
--
1037
-- Table structure for table `taxon_determination`
1038
--
1039

    
1040
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1041
/*!40101 SET character_set_client = utf8 */;
1042
CREATE TABLE `taxon_determination` (
1043
  `id` varbinary(767) NOT NULL,
1044
  `identified_by` varbinary(767) DEFAULT NULL,
1045
  `taxon_assertion` varbinary(767) NOT NULL,
1046
  `fit_info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1047
  PRIMARY KEY (`id`),
1048
  UNIQUE KEY `taxon_determination_unique` (`taxon_assertion`,`identified_by`),
1049
  KEY `fk_taxon_occurrence_has_qualified_taxon1_idx` (`taxon_assertion`),
1050
  KEY `fk_taxon_determination_party_list1_idx` (`identified_by`),
1051
  CONSTRAINT `fk_taxon_occurrence_has_qualified_taxon1` FOREIGN KEY (`taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1052
  CONSTRAINT `fk_taxon_determination_party_list1` FOREIGN KEY (`identified_by`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1053
  CONSTRAINT `fk_taxon_determination_taxon_observation1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1054
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An assertion that a [[VegCore#TaxonOccurrence|TaxonOccurrence]] is a particular [[VegCore#Taxon|Taxon]]';
1055
/*!40101 SET character_set_client = @saved_cs_client */;
1056

    
1057
--
1058
-- Dumping data for table `taxon_determination`
1059
--
1060

    
1061
/*!40000 ALTER TABLE `taxon_determination` DISABLE KEYS */;
1062
/*!40000 ALTER TABLE `taxon_determination` ENABLE KEYS */;
1063

    
1064
--
1065
-- Table structure for table `taxon_name`
1066
--
1067

    
1068
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1069
/*!40101 SET character_set_client = utf8 */;
1070
CREATE TABLE `taxon_name` (
1071
  `id` varbinary(767) NOT NULL,
1072
  `unique_name` varbinary(767) NOT NULL,
1073
  `formal_name` varbinary(767) DEFAULT NULL,
1074
  `taxon_name` varbinary(767) DEFAULT NULL,
1075
  `author` varbinary(767) DEFAULT NULL,
1076
  `common_name` varbinary(767) DEFAULT NULL,
1077
  `rank` varbinary(767) DEFAULT NULL,
1078
  `taxon_path` varbinary(767) DEFAULT NULL,
1079
  PRIMARY KEY (`id`),
1080
  KEY `fk_taxon_concept_taxon_string10_idx` (`unique_name`),
1081
  KEY `fk_taxon_name_taxon_path1_idx` (`taxon_path`),
1082
  CONSTRAINT `fk_taxon_record10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1083
  CONSTRAINT `fk_taxon_concept_taxon_string10` FOREIGN KEY (`unique_name`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE,
1084
  CONSTRAINT `fk_taxon_name_taxon_path1` FOREIGN KEY (`taxon_path`) REFERENCES `taxon_path` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1085
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
1086
/*!40101 SET character_set_client = @saved_cs_client */;
1087

    
1088
--
1089
-- Dumping data for table `taxon_name`
1090
--
1091

    
1092
/*!40000 ALTER TABLE `taxon_name` DISABLE KEYS */;
1093
/*!40000 ALTER TABLE `taxon_name` ENABLE KEYS */;
1094

    
1095
--
1096
-- Table structure for table `taxon_observation`
1097
--
1098

    
1099
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1100
/*!40101 SET character_set_client = utf8 */;
1101
CREATE TABLE `taxon_observation` (
1102
  `id` varbinary(767) NOT NULL,
1103
  `collectors` varbinary(767) DEFAULT NULL,
1104
  `collector_number` varbinary(767) DEFAULT NULL,
1105
  `voucher` varbinary(767) DEFAULT NULL,
1106
  `growth_form` varbinary(767) DEFAULT NULL,
1107
  `cultivated` tinyint(1) DEFAULT NULL,
1108
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1109
  PRIMARY KEY (`id`),
1110
  KEY `fk_taxon_observation_specimen1_idx` (`voucher`),
1111
  KEY `fk_taxon_observation_party_list1_idx` (`collectors`),
1112
  CONSTRAINT `fk_taxon_observation_party_list1` FOREIGN KEY (`collectors`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1113
  CONSTRAINT `fk_taxon_observation_sampling_event1` FOREIGN KEY (`id`) REFERENCES `sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1114
  CONSTRAINT `fk_taxon_observation_specimen1` FOREIGN KEY (`voucher`) REFERENCES `specimen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1115
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
1116
/*!40101 SET character_set_client = @saved_cs_client */;
1117

    
1118
--
1119
-- Dumping data for table `taxon_observation`
1120
--
1121

    
1122
/*!40000 ALTER TABLE `taxon_observation` DISABLE KEYS */;
1123
/*!40000 ALTER TABLE `taxon_observation` ENABLE KEYS */;
1124

    
1125
--
1126
-- Table structure for table `taxon_path`
1127
--
1128

    
1129
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1130
/*!40101 SET character_set_client = utf8 */;
1131
CREATE TABLE `taxon_path` (
1132
  `id` varbinary(767) NOT NULL,
1133
  `family` varbinary(767) DEFAULT NULL,
1134
  `genus` varbinary(767) DEFAULT NULL,
1135
  `specific_epithet` varbinary(767) DEFAULT NULL,
1136
  `ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1137
  PRIMARY KEY (`id`)
1138
) 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)';
1139
/*!40101 SET character_set_client = @saved_cs_client */;
1140

    
1141
--
1142
-- Dumping data for table `taxon_path`
1143
--
1144

    
1145
/*!40000 ALTER TABLE `taxon_path` DISABLE KEYS */;
1146
/*!40000 ALTER TABLE `taxon_path` ENABLE KEYS */;
1147

    
1148
--
1149
-- Table structure for table `taxon_presence`
1150
--
1151

    
1152
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1153
/*!40101 SET character_set_client = utf8 */;
1154
CREATE TABLE `taxon_presence` (
1155
  `id` varbinary(767) NOT NULL,
1156
  `occurrence_status` varbinary(767) DEFAULT NULL,
1157
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1158
  PRIMARY KEY (`id`),
1159
  CONSTRAINT `fk_taxon_presence_taxon_determination1` FOREIGN KEY (`id`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1160
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of just a [[VegCore#Taxon|Taxon]]''s _presence_';
1161
/*!40101 SET character_set_client = @saved_cs_client */;
1162

    
1163
--
1164
-- Dumping data for table `taxon_presence`
1165
--
1166

    
1167
/*!40000 ALTER TABLE `taxon_presence` DISABLE KEYS */;
1168
/*!40000 ALTER TABLE `taxon_presence` ENABLE KEYS */;
1169

    
1170
--
1171
-- Table structure for table `taxon_scrub`
1172
--
1173

    
1174
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1175
/*!40101 SET character_set_client = utf8 */;
1176
CREATE TABLE `taxon_scrub` (
1177
  `id` varbinary(767) NOT NULL,
1178
  `input_string` varbinary(767) NOT NULL,
1179
  `parsed_taxon_assertion` varbinary(767) NOT NULL,
1180
  `matched_taxon_concept` varbinary(767) DEFAULT NULL,
1181
  `match_score` float DEFAULT NULL,
1182
  `match_info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1183
  PRIMARY KEY (`id`),
1184
  KEY `fk_parsed_taxon_assertion_taxon_name1_idx` (`matched_taxon_concept`),
1185
  KEY `fk_taxon_scrub_taxon_assertion1_idx` (`parsed_taxon_assertion`),
1186
  KEY `fk_taxon_scrub_taxon_string1_idx` (`input_string`),
1187
  CONSTRAINT `fk_parsed_taxon_assertion_taxon_name1` FOREIGN KEY (`matched_taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1188
  CONSTRAINT `fk_taxon_scrub_taxon_assertion1` FOREIGN KEY (`parsed_taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1189
  CONSTRAINT `fk_taxon_scrub_taxon_string1` FOREIGN KEY (`input_string`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE,
1190
  CONSTRAINT `fk_taxon_scrub_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1191
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
1192
/*!40101 SET character_set_client = @saved_cs_client */;
1193

    
1194
--
1195
-- Dumping data for table `taxon_scrub`
1196
--
1197

    
1198
/*!40000 ALTER TABLE `taxon_scrub` DISABLE KEYS */;
1199
/*!40000 ALTER TABLE `taxon_scrub` ENABLE KEYS */;
1200

    
1201
--
1202
-- Table structure for table `taxon_string`
1203
--
1204

    
1205
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1206
/*!40101 SET character_set_client = utf8 */;
1207
CREATE TABLE `taxon_string` (
1208
  `string` varbinary(767) NOT NULL,
1209
  PRIMARY KEY (`string`)
1210
) 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)';
1211
/*!40101 SET character_set_client = @saved_cs_client */;
1212

    
1213
--
1214
-- Dumping data for table `taxon_string`
1215
--
1216

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

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

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