Project

General

Profile

1
SET standard_conforming_strings = off;
2
SET escape_string_warning = off;
3
-- MySQL dump 10.13  Distrib 5.5.32, for debian-linux-gnu (x86_64)
4
--
5
-- Host: localhost    Database: VegCore
6
-- ------------------------------------------------------
7
-- Server version	5.5.32-0ubuntu0.12.04.1
8

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

    
20
--
21
-- Table structure for table "aggregate_observation"
22
--
23

    
24
/*!40101 SET @saved_cs_client     = @@character_set_client */;
25
/*!40101 SET character_set_client = utf8 */;
26
CREATE TABLE "aggregate_observation" (
27
  "id" text NOT NULL,
28
  "traits" hstore DEFAULT NULL,
29
  PRIMARY KEY ("id"),
30
  /*CONSTRAINT "fk_aggregate_observation_taxon_presence1" FOREIGN KEY ("id") REFERENCES "taxon_presence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
31
) /*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)'*/;
32
/*!40101 SET character_set_client = @saved_cs_client */;
33

    
34
--
35
-- Dumping data for table "aggregate_observation"
36
--
37

    
38
/*!40000 ALTER TABLE "aggregate_observation" DISABLE KEYS */;
39
/*!40000 ALTER TABLE "aggregate_observation" ENABLE KEYS */;
40

    
41
--
42
-- Table structure for table "base_class"
43
--
44

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

    
56
--
57
-- Dumping data for table "base_class"
58
--
59

    
60
/*!40000 ALTER TABLE "base_class" DISABLE KEYS */;
61
/*!40000 ALTER TABLE "base_class" ENABLE KEYS */;
62

    
63
--
64
-- Table structure for table "collection"
65
--
66

    
67
/*!40101 SET @saved_cs_client     = @@character_set_client */;
68
/*!40101 SET character_set_client = utf8 */;
69
CREATE TABLE "collection" (
70
  "id" text NOT NULL,
71
  "institution" text NOT NULL,
72
  "name" text NOT NULL,
73
  PRIMARY KEY ("id"),
74
  /*CONSTRAINT "collection_unique" */UNIQUE ("institution","name"),
75
  /*KEY "fk_collection_organization1_idx" ("institution")*/CHECK (true),
76
  /*KEY "fk_collection_source1_idx" ("id")*/CHECK (true),
77
  /*CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
78
  /*CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
79
) /*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)'*/;
80
/*!40101 SET character_set_client = @saved_cs_client */;
81

    
82
--
83
-- Dumping data for table "collection"
84
--
85

    
86
/*!40000 ALTER TABLE "collection" DISABLE KEYS */;
87
/*!40000 ALTER TABLE "collection" ENABLE KEYS */;
88

    
89
--
90
-- Table structure for table "community"
91
--
92

    
93
/*!40101 SET @saved_cs_client     = @@character_set_client */;
94
/*!40101 SET character_set_client = utf8 */;
95
CREATE TABLE "community" (
96
  "id" text NOT NULL,
97
  "name" text NOT NULL,
98
  "info" hstore DEFAULT NULL,
99
  PRIMARY KEY ("id"),
100
  /*CONSTRAINT "fk_community_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
101
) /*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]])'*/;
102
/*!40101 SET character_set_client = @saved_cs_client */;
103

    
104
--
105
-- Dumping data for table "community"
106
--
107

    
108
/*!40000 ALTER TABLE "community" DISABLE KEYS */;
109
/*!40000 ALTER TABLE "community" ENABLE KEYS */;
110

    
111
--
112
-- Table structure for table "derived_class"
113
--
114

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

    
124
--
125
-- Dumping data for table "derived_class"
126
--
127

    
128
/*!40000 ALTER TABLE "derived_class" DISABLE KEYS */;
129
/*!40000 ALTER TABLE "derived_class" ENABLE KEYS */;
130

    
131
--
132
-- Table structure for table "event"
133
--
134

    
135
/*!40101 SET @saved_cs_client     = @@character_set_client */;
136
/*!40101 SET character_set_client = utf8 */;
137
CREATE TABLE "event" (
138
  "id" text NOT NULL,
139
  "parent" text DEFAULT NULL,
140
  "name" text DEFAULT NULL,
141
  "date_range" text DEFAULT NULL,
142
  "place" text DEFAULT NULL,
143
  "participants" text DEFAULT NULL,
144
  PRIMARY KEY ("id"),
145
  /*KEY "fk_event_place1_idx" ("place")*/CHECK (true),
146
  /*KEY "fk_event1_idx" ("parent")*/CHECK (true),
147
  /*KEY "fk_event_party_list1_idx" ("participants")*/CHECK (true),
148
  /*CONSTRAINT "fk_event_party_list1" FOREIGN KEY ("participants") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
149
  /*CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
150
  /*CONSTRAINT "fk_event_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
151
  /*CONSTRAINT "fk_event_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
152
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"an action that occurs at a place and during a period of text/*time*/" ("DwC":http://rs.tdwg.org/dwc/terms/#Event)'*/;
153
/*!40101 SET character_set_client = @saved_cs_client */;
154

    
155
--
156
-- Dumping data for table "event"
157
--
158

    
159
/*!40000 ALTER TABLE "event" DISABLE KEYS */;
160
/*!40000 ALTER TABLE "event" ENABLE KEYS */;
161

    
162
--
163
-- Table structure for table "geological_context"
164
--
165

    
166
/*!40101 SET @saved_cs_client     = @@character_set_client */;
167
/*!40101 SET character_set_client = utf8 */;
168
CREATE TABLE "geological_context" (
169
  "id" text NOT NULL,
170
  "name" text NOT NULL,
171
  "info" hstore DEFAULT NULL,
172
  PRIMARY KEY ("id"),
173
  /*CONSTRAINT "fk_geological_context_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
174
) /*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)'*/;
175
/*!40101 SET character_set_client = @saved_cs_client */;
176

    
177
--
178
-- Dumping data for table "geological_context"
179
--
180

    
181
/*!40000 ALTER TABLE "geological_context" DISABLE KEYS */;
182
/*!40000 ALTER TABLE "geological_context" ENABLE KEYS */;
183

    
184
--
185
-- Table structure for table "geopath"
186
--
187

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

    
202
--
203
-- Dumping data for table "geopath"
204
--
205

    
206
/*!40000 ALTER TABLE "geopath" DISABLE KEYS */;
207
/*!40000 ALTER TABLE "geopath" ENABLE KEYS */;
208

    
209
--
210
-- Table structure for table "geoplace"
211
--
212

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

    
225
--
226
-- Dumping data for table "geoplace"
227
--
228

    
229
/*!40000 ALTER TABLE "geoplace" DISABLE KEYS */;
230
/*!40000 ALTER TABLE "geoplace" ENABLE KEYS */;
231

    
232
--
233
-- Table structure for table "georeferencing"
234
--
235

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

    
255
--
256
-- Dumping data for table "georeferencing"
257
--
258

    
259
/*!40000 ALTER TABLE "georeferencing" DISABLE KEYS */;
260
/*!40000 ALTER TABLE "georeferencing" ENABLE KEYS */;
261

    
262
--
263
-- Table structure for table "geovalidation"
264
--
265

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

    
284
--
285
-- Dumping data for table "geovalidation"
286
--
287

    
288
/*!40000 ALTER TABLE "geovalidation" DISABLE KEYS */;
289
/*!40000 ALTER TABLE "geovalidation" ENABLE KEYS */;
290

    
291
--
292
-- Table structure for table "individual"
293
--
294

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

    
309
--
310
-- Dumping data for table "individual"
311
--
312

    
313
/*!40000 ALTER TABLE "individual" DISABLE KEYS */;
314
/*!40000 ALTER TABLE "individual" ENABLE KEYS */;
315

    
316
--
317
-- Table structure for table "individual_observation"
318
--
319

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

    
334
--
335
-- Dumping data for table "individual_observation"
336
--
337

    
338
/*!40000 ALTER TABLE "individual_observation" DISABLE KEYS */;
339
/*!40000 ALTER TABLE "individual_observation" ENABLE KEYS */;
340

    
341
--
342
-- Table structure for table "method"
343
--
344

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

    
358
--
359
-- Dumping data for table "method"
360
--
361

    
362
/*!40000 ALTER TABLE "method" DISABLE KEYS */;
363
/*!40000 ALTER TABLE "method" ENABLE KEYS */;
364

    
365
--
366
-- Table structure for table "organization"
367
--
368

    
369
/*!40101 SET @saved_cs_client     = @@character_set_client */;
370
/*!40101 SET character_set_client = utf8 */;
371
CREATE TABLE "organization" (
372
  "id" text NOT NULL,
373
  "info" hstore DEFAULT NULL,
374
  PRIMARY KEY ("id"),
375
  /*CONSTRAINT "fk_organization_party1" FOREIGN KEY ("id") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
376
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
377
/*!40101 SET character_set_client = @saved_cs_client */;
378

    
379
--
380
-- Dumping data for table "organization"
381
--
382

    
383
/*!40000 ALTER TABLE "organization" DISABLE KEYS */;
384
/*!40000 ALTER TABLE "organization" ENABLE KEYS */;
385

    
386
--
387
-- Table structure for table "party"
388
--
389

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

    
403
--
404
-- Dumping data for table "party"
405
--
406

    
407
/*!40000 ALTER TABLE "party" DISABLE KEYS */;
408
/*!40000 ALTER TABLE "party" ENABLE KEYS */;
409

    
410
--
411
-- Table structure for table "party_list"
412
--
413

    
414
/*!40101 SET @saved_cs_client     = @@character_set_client */;
415
/*!40101 SET character_set_client = utf8 */;
416
CREATE TABLE "party_list" (
417
  "id" text NOT NULL,
418
  "count" integer NOT NULL,
419
  PRIMARY KEY ("id"),
420
  /*CONSTRAINT "fk_collection_source100" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
421
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
422
/*!40101 SET character_set_client = @saved_cs_client */;
423

    
424
--
425
-- Dumping data for table "party_list"
426
--
427

    
428
/*!40000 ALTER TABLE "party_list" DISABLE KEYS */;
429
/*!40000 ALTER TABLE "party_list" ENABLE KEYS */;
430

    
431
--
432
-- Table structure for table "party_list_entry"
433
--
434

    
435
/*!40101 SET @saved_cs_client     = @@character_set_client */;
436
/*!40101 SET character_set_client = utf8 */;
437
CREATE TABLE "party_list_entry" (
438
  "id" text NOT NULL,
439
  "entry" text NOT NULL,
440
  "sort_order" integer DEFAULT NULL,
441
  PRIMARY KEY ("id","entry"),
442
  /*KEY "fk_party_list_has_party_party1_idx" ("entry")*/CHECK (true),
443
  /*KEY "fk_party_list_has_party_party_list1_idx" ("id")*/CHECK (true),
444
  /*CONSTRAINT "fk_party_list_has_party_party_list1" FOREIGN KEY ("id") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
445
  /*CONSTRAINT "fk_party_list_has_party_party1" FOREIGN KEY ("entry") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
446
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
447
/*!40101 SET character_set_client = @saved_cs_client */;
448

    
449
--
450
-- Dumping data for table "party_list_entry"
451
--
452

    
453
/*!40000 ALTER TABLE "party_list_entry" DISABLE KEYS */;
454
/*!40000 ALTER TABLE "party_list_entry" ENABLE KEYS */;
455

    
456
--
457
-- Table structure for table "place"
458
--
459

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

    
479
--
480
-- Dumping data for table "place"
481
--
482

    
483
/*!40000 ALTER TABLE "place" DISABLE KEYS */;
484
/*!40000 ALTER TABLE "place" ENABLE KEYS */;
485

    
486
--
487
-- Table structure for table "place_observation"
488
--
489

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

    
512
--
513
-- Dumping data for table "place_observation"
514
--
515

    
516
/*!40000 ALTER TABLE "place_observation" DISABLE KEYS */;
517
/*!40000 ALTER TABLE "place_observation" ENABLE KEYS */;
518

    
519
--
520
-- Table structure for table "plot"
521
--
522

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

    
540
--
541
-- Dumping data for table "plot"
542
--
543

    
544
/*!40000 ALTER TABLE "plot" DISABLE KEYS */;
545
/*!40000 ALTER TABLE "plot" ENABLE KEYS */;
546

    
547
--
548
-- Table structure for table "plot_element"
549
--
550

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

    
563
--
564
-- Dumping data for table "plot_element"
565
--
566

    
567
/*!40000 ALTER TABLE "plot_element" DISABLE KEYS */;
568
/*!40000 ALTER TABLE "plot_element" ENABLE KEYS */;
569

    
570
--
571
-- Table structure for table "project"
572
--
573

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

    
585
--
586
-- Dumping data for table "project"
587
--
588

    
589
/*!40000 ALTER TABLE "project" DISABLE KEYS */;
590
/*!40000 ALTER TABLE "project" ENABLE KEYS */;
591

    
592
--
593
-- Table structure for table "record"
594
--
595

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

    
611
--
612
-- Dumping data for table "record"
613
--
614

    
615
/*!40000 ALTER TABLE "record" DISABLE KEYS */;
616
/*!40000 ALTER TABLE "record" ENABLE KEYS */;
617

    
618
--
619
-- Table structure for table "referenced_class"
620
--
621

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

    
631
--
632
-- Dumping data for table "referenced_class"
633
--
634

    
635
/*!40000 ALTER TABLE "referenced_class" DISABLE KEYS */;
636
/*!40000 ALTER TABLE "referenced_class" ENABLE KEYS */;
637

    
638
--
639
-- Table structure for table "rel_place"
640
--
641

    
642
/*!40101 SET @saved_cs_client     = @@character_set_client */;
643
/*!40101 SET character_set_client = utf8 */;
644
CREATE TABLE "rel_place" (
645
  "id" text NOT NULL,
646
  "x_m" double precision DEFAULT NULL,
647
  "y_m" double precision DEFAULT NULL,
648
  "coords" hstore DEFAULT NULL,
649
  PRIMARY KEY ("id"),
650
  /*CONSTRAINT "fk_subplot_place2" FOREIGN KEY ("id") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
651
) /*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))'*/;
652
/*!40101 SET character_set_client = @saved_cs_client */;
653

    
654
--
655
-- Dumping data for table "rel_place"
656
--
657

    
658
/*!40000 ALTER TABLE "rel_place" DISABLE KEYS */;
659
/*!40000 ALTER TABLE "rel_place" ENABLE KEYS */;
660

    
661
--
662
-- Table structure for table "relationship"
663
--
664

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

    
681
--
682
-- Dumping data for table "relationship"
683
--
684

    
685
/*!40000 ALTER TABLE "relationship" DISABLE KEYS */;
686
/*!40000 ALTER TABLE "relationship" ENABLE KEYS */;
687

    
688
--
689
-- Table structure for table "reobservable"
690
--
691

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

    
707
--
708
-- Dumping data for table "reobservable"
709
--
710

    
711
/*!40000 ALTER TABLE "reobservable" DISABLE KEYS */;
712
/*!40000 ALTER TABLE "reobservable" ENABLE KEYS */;
713

    
714
--
715
-- Table structure for table "sampling_event"
716
--
717

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

    
730
--
731
-- Dumping data for table "sampling_event"
732
--
733

    
734
/*!40000 ALTER TABLE "sampling_event" DISABLE KEYS */;
735
/*!40000 ALTER TABLE "sampling_event" ENABLE KEYS */;
736

    
737
--
738
-- Table structure for table "scrubbed_geoplace"
739
--
740

    
741
/*!40101 SET @saved_cs_client     = @@character_set_client */;
742
/*!40101 SET character_set_client = utf8 */;
743
CREATE TABLE "scrubbed_geoplace" (
744
  "id" text NOT NULL,
745
  "parent_geoplace" text NOT NULL,
746
  PRIMARY KEY ("id"),
747
  /*KEY "fk_geoplace_geoplace1_idx" ("parent_geoplace")*/CHECK (true),
748
  /*CONSTRAINT "fk_geoplace_geoplace1" FOREIGN KEY ("parent_geoplace") REFERENCES "scrubbed_geoplace" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
749
  /*CONSTRAINT "fk_nested_geoplace_geoplace1" FOREIGN KEY ("id") REFERENCES "geoplace" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
750
) /*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)'*/;
751
/*!40101 SET character_set_client = @saved_cs_client */;
752

    
753
--
754
-- Dumping data for table "scrubbed_geoplace"
755
--
756

    
757
/*!40000 ALTER TABLE "scrubbed_geoplace" DISABLE KEYS */;
758
/*!40000 ALTER TABLE "scrubbed_geoplace" ENABLE KEYS */;
759

    
760
--
761
-- Table structure for table "soil_observation"
762
--
763

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

    
774
--
775
-- Dumping data for table "soil_observation"
776
--
777

    
778
/*!40000 ALTER TABLE "soil_observation" DISABLE KEYS */;
779
/*!40000 ALTER TABLE "soil_observation" ENABLE KEYS */;
780

    
781
--
782
-- Table structure for table "source"
783
--
784

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

    
805
--
806
-- Dumping data for table "source"
807
--
808

    
809
/*!40000 ALTER TABLE "source" DISABLE KEYS */;
810
/*!40000 ALTER TABLE "source" ENABLE KEYS */;
811

    
812
--
813
-- Table structure for table "specimen"
814
--
815

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

    
850
--
851
-- Dumping data for table "specimen"
852
--
853

    
854
/*!40000 ALTER TABLE "specimen" DISABLE KEYS */;
855
/*!40000 ALTER TABLE "specimen" ENABLE KEYS */;
856

    
857
--
858
-- Table structure for table "specimen_observation"
859
--
860

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

    
875
--
876
-- Dumping data for table "specimen_observation"
877
--
878

    
879
/*!40000 ALTER TABLE "specimen_observation" DISABLE KEYS */;
880
/*!40000 ALTER TABLE "specimen_observation" ENABLE KEYS */;
881

    
882
--
883
-- Table structure for table "stem"
884
--
885

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

    
898
--
899
-- Dumping data for table "stem"
900
--
901

    
902
/*!40000 ALTER TABLE "stem" DISABLE KEYS */;
903
/*!40000 ALTER TABLE "stem" ENABLE KEYS */;
904

    
905
--
906
-- Table structure for table "stem_observation"
907
--
908

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

    
926
--
927
-- Dumping data for table "stem_observation"
928
--
929

    
930
/*!40000 ALTER TABLE "stem_observation" DISABLE KEYS */;
931
/*!40000 ALTER TABLE "stem_observation" ENABLE KEYS */;
932

    
933
--
934
-- Table structure for table "stratum"
935
--
936

    
937
/*!40101 SET @saved_cs_client     = @@character_set_client */;
938
/*!40101 SET character_set_client = utf8 */;
939
CREATE TABLE "stratum" (
940
  "id" text NOT NULL,
941
  "name" text NOT NULL,
942
  "info" hstore DEFAULT NULL,
943
  PRIMARY KEY ("id"),
944
  /*CONSTRAINT "fk_place_path_record10" FOREIGN KEY ("id") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
945
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
946
/*!40101 SET character_set_client = @saved_cs_client */;
947

    
948
--
949
-- Dumping data for table "stratum"
950
--
951

    
952
/*!40000 ALTER TABLE "stratum" DISABLE KEYS */;
953
/*!40000 ALTER TABLE "stratum" ENABLE KEYS */;
954

    
955
--
956
-- Table structure for table "subplot"
957
--
958

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

    
969
--
970
-- Dumping data for table "subplot"
971
--
972

    
973
/*!40000 ALTER TABLE "subplot" DISABLE KEYS */;
974
/*!40000 ALTER TABLE "subplot" ENABLE KEYS */;
975

    
976
--
977
-- Table structure for table "taxon_absence"
978
--
979

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

    
989
--
990
-- Dumping data for table "taxon_absence"
991
--
992

    
993
/*!40000 ALTER TABLE "taxon_absence" DISABLE KEYS */;
994
/*!40000 ALTER TABLE "taxon_absence" ENABLE KEYS */;
995

    
996
--
997
-- Table structure for table "taxon_assertion"
998
--
999

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

    
1017
--
1018
-- Dumping data for table "taxon_assertion"
1019
--
1020

    
1021
/*!40000 ALTER TABLE "taxon_assertion" DISABLE KEYS */;
1022
/*!40000 ALTER TABLE "taxon_assertion" ENABLE KEYS */;
1023

    
1024
--
1025
-- Table structure for table "taxon_concept"
1026
--
1027

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

    
1047
--
1048
-- Dumping data for table "taxon_concept"
1049
--
1050

    
1051
/*!40000 ALTER TABLE "taxon_concept" DISABLE KEYS */;
1052
/*!40000 ALTER TABLE "taxon_concept" ENABLE KEYS */;
1053

    
1054
--
1055
-- Table structure for table "taxon_determination"
1056
--
1057

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

    
1075
--
1076
-- Dumping data for table "taxon_determination"
1077
--
1078

    
1079
/*!40000 ALTER TABLE "taxon_determination" DISABLE KEYS */;
1080
/*!40000 ALTER TABLE "taxon_determination" ENABLE KEYS */;
1081

    
1082
--
1083
-- Table structure for table "taxon_name"
1084
--
1085

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

    
1106
--
1107
-- Dumping data for table "taxon_name"
1108
--
1109

    
1110
/*!40000 ALTER TABLE "taxon_name" DISABLE KEYS */;
1111
/*!40000 ALTER TABLE "taxon_name" ENABLE KEYS */;
1112

    
1113
--
1114
-- Table structure for table "taxon_observation"
1115
--
1116

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

    
1136
--
1137
-- Dumping data for table "taxon_observation"
1138
--
1139

    
1140
/*!40000 ALTER TABLE "taxon_observation" DISABLE KEYS */;
1141
/*!40000 ALTER TABLE "taxon_observation" ENABLE KEYS */;
1142

    
1143
--
1144
-- Table structure for table "taxon_path"
1145
--
1146

    
1147
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1148
/*!40101 SET character_set_client = utf8 */;
1149
CREATE TABLE "taxon_path" (
1150
  "id" text NOT NULL,
1151
  "family" text DEFAULT NULL,
1152
  "genus" text DEFAULT NULL,
1153
  "specific_epithet" text DEFAULT NULL,
1154
  "ranks" hstore DEFAULT NULL,
1155
  PRIMARY KEY ("id")
1156
) /*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)'*/;
1157
/*!40101 SET character_set_client = @saved_cs_client */;
1158

    
1159
--
1160
-- Dumping data for table "taxon_path"
1161
--
1162

    
1163
/*!40000 ALTER TABLE "taxon_path" DISABLE KEYS */;
1164
/*!40000 ALTER TABLE "taxon_path" ENABLE KEYS */;
1165

    
1166
--
1167
-- Table structure for table "taxon_presence"
1168
--
1169

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

    
1181
--
1182
-- Dumping data for table "taxon_presence"
1183
--
1184

    
1185
/*!40000 ALTER TABLE "taxon_presence" DISABLE KEYS */;
1186
/*!40000 ALTER TABLE "taxon_presence" ENABLE KEYS */;
1187

    
1188
--
1189
-- Table structure for table "taxon_scrub"
1190
--
1191

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

    
1212
--
1213
-- Dumping data for table "taxon_scrub"
1214
--
1215

    
1216
/*!40000 ALTER TABLE "taxon_scrub" DISABLE KEYS */;
1217
/*!40000 ALTER TABLE "taxon_scrub" ENABLE KEYS */;
1218

    
1219
--
1220
-- Table structure for table "taxon_string"
1221
--
1222

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

    
1231
--
1232
-- Dumping data for table "taxon_string"
1233
--
1234

    
1235
/*!40000 ALTER TABLE "taxon_string" DISABLE KEYS */;
1236
/*!40000 ALTER TABLE "taxon_string" ENABLE KEYS */;
1237
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
1238

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

    
1247
-- Dump completed
(10-10/15)