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 NOT 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 "geocoords"
164
--
165

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

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

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

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

    
188
/*!40101 SET @saved_cs_client     = @@character_set_client */;
189
/*!40101 SET character_set_client = utf8 */;
190
CREATE TABLE "geological_context" (
191
  "id" text NOT NULL,
192
  "name" text NOT NULL,
193
  "info" hstore DEFAULT NULL,
194
  PRIMARY KEY ("id"),
195
  /*CONSTRAINT "fk_geological_context_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
196
) /*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)'*/;
197
/*!40101 SET character_set_client = @saved_cs_client */;
198

    
199
--
200
-- Dumping data for table "geological_context"
201
--
202

    
203
/*!40000 ALTER TABLE "geological_context" DISABLE KEYS */;
204
/*!40000 ALTER TABLE "geological_context" ENABLE KEYS */;
205

    
206
--
207
-- Table structure for table "geopath"
208
--
209

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

    
224
--
225
-- Dumping data for table "geopath"
226
--
227

    
228
/*!40000 ALTER TABLE "geopath" DISABLE KEYS */;
229
/*!40000 ALTER TABLE "geopath" ENABLE KEYS */;
230

    
231
--
232
-- Table structure for table "geopath_scrub"
233
--
234

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

    
250
--
251
-- Dumping data for table "geopath_scrub"
252
--
253

    
254
/*!40000 ALTER TABLE "geopath_scrub" DISABLE KEYS */;
255
/*!40000 ALTER TABLE "geopath_scrub" ENABLE KEYS */;
256

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

    
261
/*!40101 SET @saved_cs_client     = @@character_set_client */;
262
/*!40101 SET character_set_client = utf8 */;
263
CREATE TABLE "georeferencing" (
264
  "id" text NOT NULL,
265
  "input_place" text NOT NULL,
266
  "georeferenced_by" text DEFAULT NULL,
267
  "georeferenced_place" text DEFAULT NULL,
268
  PRIMARY KEY ("id"),
269
  /*KEY "fk_georef_place1_idx" ("input_place")*/CHECK (true),
270
  /*KEY "fk_georeferencing_geoplace1_idx" ("georeferenced_place")*/CHECK (true),
271
  /*KEY "fk_georeferencing_party_list1_idx" ("georeferenced_by")*/CHECK (true),
272
  /*CONSTRAINT "fk_georeferencing_geoplace1" FOREIGN KEY ("georeferenced_place") REFERENCES "geoplace" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
273
  /*CONSTRAINT "fk_georeferencing_party_list1" FOREIGN KEY ("georeferenced_by") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
274
  /*CONSTRAINT "fk_georef_place1" FOREIGN KEY ("input_place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
275
  /*CONSTRAINT "fk_geovalidation_record100" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
276
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
277
/*!40101 SET character_set_client = @saved_cs_client */;
278

    
279
--
280
-- Dumping data for table "georeferencing"
281
--
282

    
283
/*!40000 ALTER TABLE "georeferencing" DISABLE KEYS */;
284
/*!40000 ALTER TABLE "georeferencing" ENABLE KEYS */;
285

    
286
--
287
-- Table structure for table "geovalidation"
288
--
289

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

    
308
--
309
-- Dumping data for table "geovalidation"
310
--
311

    
312
/*!40000 ALTER TABLE "geovalidation" DISABLE KEYS */;
313
/*!40000 ALTER TABLE "geovalidation" ENABLE KEYS */;
314

    
315
--
316
-- Table structure for table "individual"
317
--
318

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

    
330
--
331
-- Dumping data for table "individual"
332
--
333

    
334
/*!40000 ALTER TABLE "individual" DISABLE KEYS */;
335
/*!40000 ALTER TABLE "individual" ENABLE KEYS */;
336

    
337
--
338
-- Table structure for table "individual_observation"
339
--
340

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

    
355
--
356
-- Dumping data for table "individual_observation"
357
--
358

    
359
/*!40000 ALTER TABLE "individual_observation" DISABLE KEYS */;
360
/*!40000 ALTER TABLE "individual_observation" ENABLE KEYS */;
361

    
362
--
363
-- Table structure for table "method"
364
--
365

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

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

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

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

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

    
400
--
401
-- Dumping data for table "organization"
402
--
403

    
404
/*!40000 ALTER TABLE "organization" DISABLE KEYS */;
405
/*!40000 ALTER TABLE "organization" ENABLE KEYS */;
406

    
407
--
408
-- Table structure for table "party"
409
--
410

    
411
/*!40101 SET @saved_cs_client     = @@character_set_client */;
412
/*!40101 SET character_set_client = utf8 */;
413
CREATE TABLE "party" (
414
  "id" text NOT NULL,
415
  "organization" text DEFAULT NULL,
416
  "info" hstore DEFAULT NULL,
417
  PRIMARY KEY ("id"),
418
  /*KEY "fk_party_organization1_idx" ("organization")*/CHECK (true),
419
  /*CONSTRAINT "fk_party_organization1" FOREIGN KEY ("organization") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
420
  /*CONSTRAINT "fk_collection_source10" 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"
426
--
427

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

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

    
435
/*!40101 SET @saved_cs_client     = @@character_set_client */;
436
/*!40101 SET character_set_client = utf8 */;
437
CREATE TABLE "party_list" (
438
  "id" text NOT NULL,
439
  "count" integer NOT NULL,
440
  PRIMARY KEY ("id"),
441
  /*CONSTRAINT "fk_collection_source100" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
442
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
443
/*!40101 SET character_set_client = @saved_cs_client */;
444

    
445
--
446
-- Dumping data for table "party_list"
447
--
448

    
449
/*!40000 ALTER TABLE "party_list" DISABLE KEYS */;
450
/*!40000 ALTER TABLE "party_list" ENABLE KEYS */;
451

    
452
--
453
-- Table structure for table "party_list_entry"
454
--
455

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

    
470
--
471
-- Dumping data for table "party_list_entry"
472
--
473

    
474
/*!40000 ALTER TABLE "party_list_entry" DISABLE KEYS */;
475
/*!40000 ALTER TABLE "party_list_entry" ENABLE KEYS */;
476

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

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

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

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

    
505
--
506
-- Table structure for table "place_observation"
507
--
508

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

    
531
--
532
-- Dumping data for table "place_observation"
533
--
534

    
535
/*!40000 ALTER TABLE "place_observation" DISABLE KEYS */;
536
/*!40000 ALTER TABLE "place_observation" ENABLE KEYS */;
537

    
538
--
539
-- Table structure for table "plot"
540
--
541

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

    
557
--
558
-- Dumping data for table "plot"
559
--
560

    
561
/*!40000 ALTER TABLE "plot" DISABLE KEYS */;
562
/*!40000 ALTER TABLE "plot" ENABLE KEYS */;
563

    
564
--
565
-- Table structure for table "project"
566
--
567

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

    
579
--
580
-- Dumping data for table "project"
581
--
582

    
583
/*!40000 ALTER TABLE "project" DISABLE KEYS */;
584
/*!40000 ALTER TABLE "project" ENABLE KEYS */;
585

    
586
--
587
-- Table structure for table "record"
588
--
589

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

    
605
--
606
-- Dumping data for table "record"
607
--
608

    
609
/*!40000 ALTER TABLE "record" DISABLE KEYS */;
610
/*!40000 ALTER TABLE "record" ENABLE KEYS */;
611

    
612
--
613
-- Table structure for table "referenced_class"
614
--
615

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

    
625
--
626
-- Dumping data for table "referenced_class"
627
--
628

    
629
/*!40000 ALTER TABLE "referenced_class" DISABLE KEYS */;
630
/*!40000 ALTER TABLE "referenced_class" ENABLE KEYS */;
631

    
632
--
633
-- Table structure for table "relationship"
634
--
635

    
636
/*!40101 SET @saved_cs_client     = @@character_set_client */;
637
/*!40101 SET character_set_client = utf8 */;
638
CREATE TABLE "relationship" (
639
  "id" text NOT NULL,
640
  "record" text NOT NULL,
641
  "related_record" text NOT NULL,
642
  "info" hstore DEFAULT NULL,
643
  PRIMARY KEY ("id"),
644
  /*KEY "fk_relationship_record1_idx" ("record")*/CHECK (true),
645
  /*KEY "fk_relationship_related_record_idx" ("related_record")*/CHECK (true),
646
  /*CONSTRAINT "fk_relationship_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
647
  /*CONSTRAINT "fk_relationship_record2" FOREIGN KEY ("record") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
648
  /*CONSTRAINT "fk_relationship_related_record" FOREIGN KEY ("related_record") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
649
) /*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)'*/;
650
/*!40101 SET character_set_client = @saved_cs_client */;
651

    
652
--
653
-- Dumping data for table "relationship"
654
--
655

    
656
/*!40000 ALTER TABLE "relationship" DISABLE KEYS */;
657
/*!40000 ALTER TABLE "relationship" ENABLE KEYS */;
658

    
659
--
660
-- Table structure for table "sampling_event"
661
--
662

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

    
675
--
676
-- Dumping data for table "sampling_event"
677
--
678

    
679
/*!40000 ALTER TABLE "sampling_event" DISABLE KEYS */;
680
/*!40000 ALTER TABLE "sampling_event" ENABLE KEYS */;
681

    
682
--
683
-- Table structure for table "soil_observation"
684
--
685

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

    
696
--
697
-- Dumping data for table "soil_observation"
698
--
699

    
700
/*!40000 ALTER TABLE "soil_observation" DISABLE KEYS */;
701
/*!40000 ALTER TABLE "soil_observation" ENABLE KEYS */;
702

    
703
--
704
-- Table structure for table "source"
705
--
706

    
707
/*!40101 SET @saved_cs_client     = @@character_set_client */;
708
/*!40101 SET character_set_client = utf8 */;
709
CREATE TABLE "source" (
710
  "id" text NOT NULL,
711
  "parent" text NOT NULL,
712
  "name" text NOT NULL,
713
  "first_publisher" text DEFAULT NULL,
714
  "owner" text DEFAULT NULL,
715
  "info" hstore DEFAULT NULL,
716
  PRIMARY KEY ("id"),
717
  /*CONSTRAINT "source_unique" */UNIQUE ("parent","name"),
718
  /*KEY "fk_source1_idx" ("parent")*/CHECK (true),
719
  /*KEY "fk_source_party1_idx" ("owner")*/CHECK (true),
720
  /*KEY "fk_source_party2_idx" ("first_publisher")*/CHECK (true),
721
  /*CONSTRAINT "fk_source1" FOREIGN KEY ("parent") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
722
  /*CONSTRAINT "fk_source_party1" FOREIGN KEY ("owner") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
723
  /*CONSTRAINT "fk_source_party2" FOREIGN KEY ("first_publisher") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
724
) /*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)'*/;
725
/*!40101 SET character_set_client = @saved_cs_client */;
726

    
727
--
728
-- Dumping data for table "source"
729
--
730

    
731
/*!40000 ALTER TABLE "source" DISABLE KEYS */;
732
/*!40000 ALTER TABLE "source" ENABLE KEYS */;
733

    
734
--
735
-- Table structure for table "specimen"
736
--
737

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

    
772
--
773
-- Dumping data for table "specimen"
774
--
775

    
776
/*!40000 ALTER TABLE "specimen" DISABLE KEYS */;
777
/*!40000 ALTER TABLE "specimen" ENABLE KEYS */;
778

    
779
--
780
-- Table structure for table "specimen_observation"
781
--
782

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

    
796
--
797
-- Dumping data for table "specimen_observation"
798
--
799

    
800
/*!40000 ALTER TABLE "specimen_observation" DISABLE KEYS */;
801
/*!40000 ALTER TABLE "specimen_observation" ENABLE KEYS */;
802

    
803
--
804
-- Table structure for table "stem"
805
--
806

    
807
/*!40101 SET @saved_cs_client     = @@character_set_client */;
808
/*!40101 SET character_set_client = utf8 */;
809
CREATE TABLE "stem" (
810
  "id" text NOT NULL,
811
  "individual" text NOT NULL,
812
  PRIMARY KEY ("id"),
813
  /*KEY "fk_stem_individual1_idx" ("individual")*/CHECK (true),
814
  /*CONSTRAINT "fk_stem_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
815
  /*CONSTRAINT "fk_stem_individual2" FOREIGN KEY ("id") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
816
) /*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)'*/;
817
/*!40101 SET character_set_client = @saved_cs_client */;
818

    
819
--
820
-- Dumping data for table "stem"
821
--
822

    
823
/*!40000 ALTER TABLE "stem" DISABLE KEYS */;
824
/*!40000 ALTER TABLE "stem" ENABLE KEYS */;
825

    
826
--
827
-- Table structure for table "stem_observation"
828
--
829

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

    
847
--
848
-- Dumping data for table "stem_observation"
849
--
850

    
851
/*!40000 ALTER TABLE "stem_observation" DISABLE KEYS */;
852
/*!40000 ALTER TABLE "stem_observation" ENABLE KEYS */;
853

    
854
--
855
-- Table structure for table "stratum"
856
--
857

    
858
/*!40101 SET @saved_cs_client     = @@character_set_client */;
859
/*!40101 SET character_set_client = utf8 */;
860
CREATE TABLE "stratum" (
861
  "id" text NOT NULL,
862
  "name" text NOT NULL,
863
  "info" hstore DEFAULT NULL,
864
  PRIMARY KEY ("id"),
865
  /*CONSTRAINT "fk_place_path_record10" FOREIGN KEY ("id") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
866
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
867
/*!40101 SET character_set_client = @saved_cs_client */;
868

    
869
--
870
-- Dumping data for table "stratum"
871
--
872

    
873
/*!40000 ALTER TABLE "stratum" DISABLE KEYS */;
874
/*!40000 ALTER TABLE "stratum" ENABLE KEYS */;
875

    
876
--
877
-- Table structure for table "subplot"
878
--
879

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

    
892
--
893
-- Dumping data for table "subplot"
894
--
895

    
896
/*!40000 ALTER TABLE "subplot" DISABLE KEYS */;
897
/*!40000 ALTER TABLE "subplot" ENABLE KEYS */;
898

    
899
--
900
-- Table structure for table "taxon_absence"
901
--
902

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

    
915
--
916
-- Dumping data for table "taxon_absence"
917
--
918

    
919
/*!40000 ALTER TABLE "taxon_absence" DISABLE KEYS */;
920
/*!40000 ALTER TABLE "taxon_absence" ENABLE KEYS */;
921

    
922
--
923
-- Table structure for table "taxon_assertion"
924
--
925

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

    
943
--
944
-- Dumping data for table "taxon_assertion"
945
--
946

    
947
/*!40000 ALTER TABLE "taxon_assertion" DISABLE KEYS */;
948
/*!40000 ALTER TABLE "taxon_assertion" ENABLE KEYS */;
949

    
950
--
951
-- Table structure for table "taxon_concept"
952
--
953

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

    
973
--
974
-- Dumping data for table "taxon_concept"
975
--
976

    
977
/*!40000 ALTER TABLE "taxon_concept" DISABLE KEYS */;
978
/*!40000 ALTER TABLE "taxon_concept" ENABLE KEYS */;
979

    
980
--
981
-- Table structure for table "taxon_determination"
982
--
983

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

    
1004
--
1005
-- Dumping data for table "taxon_determination"
1006
--
1007

    
1008
/*!40000 ALTER TABLE "taxon_determination" DISABLE KEYS */;
1009
/*!40000 ALTER TABLE "taxon_determination" ENABLE KEYS */;
1010

    
1011
--
1012
-- Table structure for table "taxon_name"
1013
--
1014

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

    
1032
--
1033
-- Dumping data for table "taxon_name"
1034
--
1035

    
1036
/*!40000 ALTER TABLE "taxon_name" DISABLE KEYS */;
1037
/*!40000 ALTER TABLE "taxon_name" ENABLE KEYS */;
1038

    
1039
--
1040
-- Table structure for table "taxon_observation"
1041
--
1042

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

    
1065
--
1066
-- Dumping data for table "taxon_observation"
1067
--
1068

    
1069
/*!40000 ALTER TABLE "taxon_observation" DISABLE KEYS */;
1070
/*!40000 ALTER TABLE "taxon_observation" ENABLE KEYS */;
1071

    
1072
--
1073
-- Table structure for table "taxon_occurrence"
1074
--
1075

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

    
1091
--
1092
-- Dumping data for table "taxon_occurrence"
1093
--
1094

    
1095
/*!40000 ALTER TABLE "taxon_occurrence" DISABLE KEYS */;
1096
/*!40000 ALTER TABLE "taxon_occurrence" ENABLE KEYS */;
1097

    
1098
--
1099
-- Table structure for table "taxon_path"
1100
--
1101

    
1102
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1103
/*!40101 SET character_set_client = utf8 */;
1104
CREATE TABLE "taxon_path" (
1105
  "id" text NOT NULL,
1106
  "family" text DEFAULT NULL,
1107
  "genus" text DEFAULT NULL,
1108
  "specific_epithet" text DEFAULT NULL,
1109
  "ranks" hstore DEFAULT NULL,
1110
  PRIMARY KEY ("id"),
1111
  /*CONSTRAINT "fk_taxon_path_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1112
) /*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)'*/;
1113
/*!40101 SET character_set_client = @saved_cs_client */;
1114

    
1115
--
1116
-- Dumping data for table "taxon_path"
1117
--
1118

    
1119
/*!40000 ALTER TABLE "taxon_path" DISABLE KEYS */;
1120
/*!40000 ALTER TABLE "taxon_path" ENABLE KEYS */;
1121

    
1122
--
1123
-- Table structure for table "taxon_presence"
1124
--
1125

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

    
1139
--
1140
-- Dumping data for table "taxon_presence"
1141
--
1142

    
1143
/*!40000 ALTER TABLE "taxon_presence" DISABLE KEYS */;
1144
/*!40000 ALTER TABLE "taxon_presence" ENABLE KEYS */;
1145

    
1146
--
1147
-- Table structure for table "taxon_scrub"
1148
--
1149

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

    
1170
--
1171
-- Dumping data for table "taxon_scrub"
1172
--
1173

    
1174
/*!40000 ALTER TABLE "taxon_scrub" DISABLE KEYS */;
1175
/*!40000 ALTER TABLE "taxon_scrub" ENABLE KEYS */;
1176

    
1177
--
1178
-- Table structure for table "taxon_string"
1179
--
1180

    
1181
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1182
/*!40101 SET character_set_client = utf8 */;
1183
CREATE TABLE "taxon_string" (
1184
  "string" text NOT NULL,
1185
  PRIMARY KEY ("string")
1186
) /*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)'*/;
1187
/*!40101 SET character_set_client = @saved_cs_client */;
1188

    
1189
--
1190
-- Dumping data for table "taxon_string"
1191
--
1192

    
1193
/*!40000 ALTER TABLE "taxon_string" DISABLE KEYS */;
1194
/*!40000 ALTER TABLE "taxon_string" ENABLE KEYS */;
1195

    
1196
--
1197
-- Table structure for table "validatable_geoplace"
1198
--
1199

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

    
1216
--
1217
-- Dumping data for table "validatable_geoplace"
1218
--
1219

    
1220
/*!40000 ALTER TABLE "validatable_geoplace" DISABLE KEYS */;
1221
/*!40000 ALTER TABLE "validatable_geoplace" ENABLE KEYS */;
1222
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
1223

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

    
1232
-- Dump completed
(9-9/14)