Project

General

Profile

1
SET standard_conforming_strings = off;
2
SET escape_string_warning = off;
3
-- MySQL dump 10.13  Distrib 5.5.31, for debian-linux-gnu (x86_64)
4
--
5
-- Host: localhost    Database: VegCore
6
-- ------------------------------------------------------
7
-- Server version	5.5.31-0ubuntu0.12.04.2
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
  "taxon_concept" text NOT NULL,
29
  "traits" hstore DEFAULT NULL,
30
  PRIMARY KEY ("id"),
31
  /*KEY "fk_aggregate_observation_taxon_name1_idx" ("taxon_concept")*/CHECK (true),
32
  /*CONSTRAINT "fk_aggregate_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
33
  /*CONSTRAINT "fk_aggregate_observation_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
34
) /*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)'*/;
35
/*!40101 SET character_set_client = @saved_cs_client */;
36

    
37
--
38
-- Dumping data for table "aggregate_observation"
39
--
40

    
41
/*!40000 ALTER TABLE "aggregate_observation" DISABLE KEYS */;
42
/*!40000 ALTER TABLE "aggregate_observation" ENABLE KEYS */;
43

    
44
--
45
-- Table structure for table "base_class"
46
--
47

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

    
59
--
60
-- Dumping data for table "base_class"
61
--
62

    
63
/*!40000 ALTER TABLE "base_class" DISABLE KEYS */;
64
/*!40000 ALTER TABLE "base_class" ENABLE KEYS */;
65

    
66
--
67
-- Table structure for table "collection"
68
--
69

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

    
85
--
86
-- Dumping data for table "collection"
87
--
88

    
89
/*!40000 ALTER TABLE "collection" DISABLE KEYS */;
90
/*!40000 ALTER TABLE "collection" ENABLE KEYS */;
91

    
92
--
93
-- Table structure for table "community"
94
--
95

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

    
107
--
108
-- Dumping data for table "community"
109
--
110

    
111
/*!40000 ALTER TABLE "community" DISABLE KEYS */;
112
/*!40000 ALTER TABLE "community" ENABLE KEYS */;
113

    
114
--
115
-- Table structure for table "coordinates"
116
--
117

    
118
/*!40101 SET @saved_cs_client     = @@character_set_client */;
119
/*!40101 SET character_set_client = utf8 */;
120
CREATE TABLE "coordinates" (
121
  "id" text NOT NULL,
122
  "latitude_deg" text DEFAULT NULL,
123
  "longitude_deg" text DEFAULT NULL,
124
  PRIMARY KEY ("id")
125
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A numerically-defined point'*/;
126
/*!40101 SET character_set_client = @saved_cs_client */;
127

    
128
--
129
-- Dumping data for table "coordinates"
130
--
131

    
132
/*!40000 ALTER TABLE "coordinates" DISABLE KEYS */;
133
/*!40000 ALTER TABLE "coordinates" ENABLE KEYS */;
134

    
135
--
136
-- Table structure for table "derived_class"
137
--
138

    
139
/*!40101 SET @saved_cs_client     = @@character_set_client */;
140
/*!40101 SET character_set_client = utf8 */;
141
CREATE TABLE "derived_class" (
142
  "id" text NOT NULL,
143
  PRIMARY KEY ("id"),
144
  /*CONSTRAINT "fk_derived_class_base_class1" FOREIGN KEY ("id") REFERENCES "base_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
145
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
146
/*!40101 SET character_set_client = @saved_cs_client */;
147

    
148
--
149
-- Dumping data for table "derived_class"
150
--
151

    
152
/*!40000 ALTER TABLE "derived_class" DISABLE KEYS */;
153
/*!40000 ALTER TABLE "derived_class" ENABLE KEYS */;
154

    
155
--
156
-- Table structure for table "event"
157
--
158

    
159
/*!40101 SET @saved_cs_client     = @@character_set_client */;
160
/*!40101 SET character_set_client = utf8 */;
161
CREATE TABLE "event" (
162
  "id" text NOT NULL,
163
  "parent" text NOT NULL,
164
  "name" text DEFAULT NULL,
165
  "date_range" text DEFAULT NULL,
166
  "place" text DEFAULT NULL,
167
  "participants" text DEFAULT NULL,
168
  "method" text DEFAULT NULL,
169
  PRIMARY KEY ("id"),
170
  /*KEY "fk_event_place1_idx" ("place")*/CHECK (true),
171
  /*KEY "fk_event1_idx" ("parent")*/CHECK (true),
172
  /*KEY "fk_event_method1_idx" ("method")*/CHECK (true),
173
  /*KEY "fk_event_party_list1_idx" ("participants")*/CHECK (true),
174
  /*CONSTRAINT "fk_event_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
175
  /*CONSTRAINT "fk_event_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
176
  /*CONSTRAINT "fk_event_party_list1" FOREIGN KEY ("participants") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
177
  /*CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
178
  /*CONSTRAINT "fk_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
179
) /*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)'*/;
180
/*!40101 SET character_set_client = @saved_cs_client */;
181

    
182
--
183
-- Dumping data for table "event"
184
--
185

    
186
/*!40000 ALTER TABLE "event" DISABLE KEYS */;
187
/*!40000 ALTER TABLE "event" ENABLE KEYS */;
188

    
189
--
190
-- Table structure for table "geological_context"
191
--
192

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

    
204
--
205
-- Dumping data for table "geological_context"
206
--
207

    
208
/*!40000 ALTER TABLE "geological_context" DISABLE KEYS */;
209
/*!40000 ALTER TABLE "geological_context" ENABLE KEYS */;
210

    
211
--
212
-- Table structure for table "geovalidation"
213
--
214

    
215
/*!40101 SET @saved_cs_client     = @@character_set_client */;
216
/*!40101 SET character_set_client = utf8 */;
217
CREATE TABLE "geovalidation" (
218
  "id" text NOT NULL,
219
  "geovalid" integer NOT NULL,
220
  "lat_long_domain_valid" integer NOT NULL,
221
  "lat_long_in_place_ranks" hstore DEFAULT NULL,
222
  PRIMARY KEY ("id"),
223
  /*CONSTRAINT "fk_geovalidation_validatable_place1" FOREIGN KEY ("id") REFERENCES "validatable_place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
224
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='The accuracy of the [[VegCore#Coordinates|Coordinates]], taking into account the [[VegCore#Placename|Placename]]'*/;
225
/*!40101 SET character_set_client = @saved_cs_client */;
226

    
227
--
228
-- Dumping data for table "geovalidation"
229
--
230

    
231
/*!40000 ALTER TABLE "geovalidation" DISABLE KEYS */;
232
/*!40000 ALTER TABLE "geovalidation" ENABLE KEYS */;
233

    
234
--
235
-- Table structure for table "individual"
236
--
237

    
238
/*!40101 SET @saved_cs_client     = @@character_set_client */;
239
/*!40101 SET character_set_client = utf8 */;
240
CREATE TABLE "individual" (
241
  "id" text NOT NULL,
242
  "tag" text DEFAULT NULL,
243
  "tag_history" hstore DEFAULT NULL,
244
  PRIMARY KEY ("id"),
245
  /*CONSTRAINT "fk_individual_record1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
246
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A distinct biological organism'*/;
247
/*!40101 SET character_set_client = @saved_cs_client */;
248

    
249
--
250
-- Dumping data for table "individual"
251
--
252

    
253
/*!40000 ALTER TABLE "individual" DISABLE KEYS */;
254
/*!40000 ALTER TABLE "individual" ENABLE KEYS */;
255

    
256
--
257
-- Table structure for table "individual_observation"
258
--
259

    
260
/*!40101 SET @saved_cs_client     = @@character_set_client */;
261
/*!40101 SET character_set_client = utf8 */;
262
CREATE TABLE "individual_observation" (
263
  "id" text NOT NULL,
264
  "individual" text DEFAULT NULL,
265
  "code" text DEFAULT NULL,
266
  "traits" hstore DEFAULT NULL,
267
  PRIMARY KEY ("id"),
268
  /*KEY "fk_individual_observation_individual1_idx" ("individual")*/CHECK (true),
269
  /*CONSTRAINT "fk_individual_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
270
  /*CONSTRAINT "fk_individual_observation_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
271
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of an [[VegCore#Individual|Individual]]'*/;
272
/*!40101 SET character_set_client = @saved_cs_client */;
273

    
274
--
275
-- Dumping data for table "individual_observation"
276
--
277

    
278
/*!40000 ALTER TABLE "individual_observation" DISABLE KEYS */;
279
/*!40000 ALTER TABLE "individual_observation" ENABLE KEYS */;
280

    
281
--
282
-- Table structure for table "method"
283
--
284

    
285
/*!40101 SET @saved_cs_client     = @@character_set_client */;
286
/*!40101 SET character_set_client = utf8 */;
287
CREATE TABLE "method" (
288
  "id" text NOT NULL,
289
  "parent" text NOT NULL,
290
  "info" hstore DEFAULT NULL,
291
  PRIMARY KEY ("id"),
292
  /*KEY "fk_method_method1_idx" ("parent")*/CHECK (true),
293
  /*CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
294
  /*CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
295
) /*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)'*/;
296
/*!40101 SET character_set_client = @saved_cs_client */;
297

    
298
--
299
-- Dumping data for table "method"
300
--
301

    
302
/*!40000 ALTER TABLE "method" DISABLE KEYS */;
303
/*!40000 ALTER TABLE "method" ENABLE KEYS */;
304

    
305
--
306
-- Table structure for table "organization"
307
--
308

    
309
/*!40101 SET @saved_cs_client     = @@character_set_client */;
310
/*!40101 SET character_set_client = utf8 */;
311
CREATE TABLE "organization" (
312
  "id" text NOT NULL,
313
  "info" hstore DEFAULT NULL,
314
  PRIMARY KEY ("id"),
315
  /*CONSTRAINT "fk_organization_party1" FOREIGN KEY ("id") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
316
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
317
/*!40101 SET character_set_client = @saved_cs_client */;
318

    
319
--
320
-- Dumping data for table "organization"
321
--
322

    
323
/*!40000 ALTER TABLE "organization" DISABLE KEYS */;
324
/*!40000 ALTER TABLE "organization" ENABLE KEYS */;
325

    
326
--
327
-- Table structure for table "parsed_taxon_assertion"
328
--
329

    
330
/*!40101 SET @saved_cs_client     = @@character_set_client */;
331
/*!40101 SET character_set_client = utf8 */;
332
CREATE TABLE "parsed_taxon_assertion" (
333
  "id" text NOT NULL,
334
  "matched_taxon_concept" text DEFAULT NULL,
335
  "match_score" float DEFAULT NULL,
336
  "match_info" hstore DEFAULT NULL,
337
  PRIMARY KEY ("id"),
338
  /*KEY "fk_parsed_taxon_assertion_taxon_name1_idx" ("matched_taxon_concept")*/CHECK (true),
339
  /*CONSTRAINT "fk_matched_taxon_qualified_taxon10" FOREIGN KEY ("id") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
340
  /*CONSTRAINT "fk_parsed_taxon_assertion_taxon_name1" FOREIGN KEY ("matched_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
341
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
342
/*!40101 SET character_set_client = @saved_cs_client */;
343

    
344
--
345
-- Dumping data for table "parsed_taxon_assertion"
346
--
347

    
348
/*!40000 ALTER TABLE "parsed_taxon_assertion" DISABLE KEYS */;
349
/*!40000 ALTER TABLE "parsed_taxon_assertion" ENABLE KEYS */;
350

    
351
--
352
-- Table structure for table "party"
353
--
354

    
355
/*!40101 SET @saved_cs_client     = @@character_set_client */;
356
/*!40101 SET character_set_client = utf8 */;
357
CREATE TABLE "party" (
358
  "id" text NOT NULL,
359
  "organization" text DEFAULT NULL,
360
  "info" hstore DEFAULT NULL,
361
  PRIMARY KEY ("id"),
362
  /*KEY "fk_party_organization1_idx" ("organization")*/CHECK (true),
363
  /*CONSTRAINT "fk_collection_source10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
364
  /*CONSTRAINT "fk_party_organization1" FOREIGN KEY ("organization") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
365
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
366
/*!40101 SET character_set_client = @saved_cs_client */;
367

    
368
--
369
-- Dumping data for table "party"
370
--
371

    
372
/*!40000 ALTER TABLE "party" DISABLE KEYS */;
373
/*!40000 ALTER TABLE "party" ENABLE KEYS */;
374

    
375
--
376
-- Table structure for table "party_list"
377
--
378

    
379
/*!40101 SET @saved_cs_client     = @@character_set_client */;
380
/*!40101 SET character_set_client = utf8 */;
381
CREATE TABLE "party_list" (
382
  "id" text NOT NULL,
383
  "count" integer NOT NULL,
384
  PRIMARY KEY ("id"),
385
  /*CONSTRAINT "fk_collection_source100" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
386
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
387
/*!40101 SET character_set_client = @saved_cs_client */;
388

    
389
--
390
-- Dumping data for table "party_list"
391
--
392

    
393
/*!40000 ALTER TABLE "party_list" DISABLE KEYS */;
394
/*!40000 ALTER TABLE "party_list" ENABLE KEYS */;
395

    
396
--
397
-- Table structure for table "party_list_entry"
398
--
399

    
400
/*!40101 SET @saved_cs_client     = @@character_set_client */;
401
/*!40101 SET character_set_client = utf8 */;
402
CREATE TABLE "party_list_entry" (
403
  "id" text NOT NULL,
404
  "entry" text NOT NULL,
405
  "sort_order" integer DEFAULT NULL,
406
  PRIMARY KEY ("id","entry"),
407
  /*KEY "fk_party_list_has_party_party1_idx" ("entry")*/CHECK (true),
408
  /*KEY "fk_party_list_has_party_party_list1_idx" ("id")*/CHECK (true),
409
  /*CONSTRAINT "fk_party_list_has_party_party_list1" FOREIGN KEY ("id") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
410
  /*CONSTRAINT "fk_party_list_has_party_party1" FOREIGN KEY ("entry") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
411
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
412
/*!40101 SET character_set_client = @saved_cs_client */;
413

    
414
--
415
-- Dumping data for table "party_list_entry"
416
--
417

    
418
/*!40000 ALTER TABLE "party_list_entry" DISABLE KEYS */;
419
/*!40000 ALTER TABLE "party_list_entry" ENABLE KEYS */;
420

    
421
--
422
-- Table structure for table "place"
423
--
424

    
425
/*!40101 SET @saved_cs_client     = @@character_set_client */;
426
/*!40101 SET character_set_client = utf8 */;
427
CREATE TABLE "place" (
428
  "id" text NOT NULL,
429
  "parent" text NOT NULL,
430
  "coordinates" text DEFAULT NULL,
431
  "path" text DEFAULT NULL,
432
  "locality" text DEFAULT NULL,
433
  PRIMARY KEY ("id"),
434
  /*KEY "fk_place_coordinates1_idx" ("coordinates")*/CHECK (true),
435
  /*KEY "fk_place1_idx" ("parent")*/CHECK (true),
436
  /*KEY "fk_place_place_path1_idx" ("path")*/CHECK (true),
437
  /*CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
438
  /*CONSTRAINT "fk_place_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
439
  /*CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
440
  /*CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
441
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A spatial region" ("DwC":http://rs.tdwg.org/dwc/terms/#dcterms:Location) or point'*/;
442
/*!40101 SET character_set_client = @saved_cs_client */;
443

    
444
--
445
-- Dumping data for table "place"
446
--
447

    
448
/*!40000 ALTER TABLE "place" DISABLE KEYS */;
449
/*!40000 ALTER TABLE "place" ENABLE KEYS */;
450

    
451
--
452
-- Table structure for table "place_observation"
453
--
454

    
455
/*!40101 SET @saved_cs_client     = @@character_set_client */;
456
/*!40101 SET character_set_client = utf8 */;
457
CREATE TABLE "place_observation" (
458
  "id" text NOT NULL,
459
  "place" text NOT NULL,
460
  "elevation_m" double precision DEFAULT NULL,
461
  "slope_incline_deg" double precision DEFAULT NULL,
462
  "slope_direction_deg_N" double precision DEFAULT NULL,
463
  "geological_context" text DEFAULT NULL,
464
  "community" text DEFAULT NULL,
465
  "observations" hstore DEFAULT NULL,
466
  PRIMARY KEY ("id"),
467
  /*KEY "fk_place_observation_place1_idx" ("place")*/CHECK (true),
468
  /*KEY "fk_place_observation_geological_context1_idx" ("geological_context")*/CHECK (true),
469
  /*KEY "fk_place_observation_community1_idx" ("community")*/CHECK (true),
470
  /*KEY "fk_place_observation_event1_idx" ("id")*/CHECK (true),
471
  /*CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
472
  /*CONSTRAINT "fk_place_observation_geological_context1" FOREIGN KEY ("geological_context") REFERENCES "geological_context" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
473
  /*CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
474
  /*CONSTRAINT "fk_place_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
475
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]'*/;
476
/*!40101 SET character_set_client = @saved_cs_client */;
477

    
478
--
479
-- Dumping data for table "place_observation"
480
--
481

    
482
/*!40000 ALTER TABLE "place_observation" DISABLE KEYS */;
483
/*!40000 ALTER TABLE "place_observation" ENABLE KEYS */;
484

    
485
--
486
-- Table structure for table "place_path"
487
--
488

    
489
/*!40101 SET @saved_cs_client     = @@character_set_client */;
490
/*!40101 SET character_set_client = utf8 */;
491
CREATE TABLE "place_path" (
492
  "id" text NOT NULL,
493
  "continent" text DEFAULT NULL,
494
  "country" text DEFAULT NULL,
495
  "state_province" text DEFAULT NULL,
496
  "county" text DEFAULT NULL,
497
  "municipality" text DEFAULT NULL,
498
  "ranks" hstore DEFAULT NULL,
499
  PRIMARY KEY ("id")
500
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A named region'*/;
501
/*!40101 SET character_set_client = @saved_cs_client */;
502

    
503
--
504
-- Dumping data for table "place_path"
505
--
506

    
507
/*!40000 ALTER TABLE "place_path" DISABLE KEYS */;
508
/*!40000 ALTER TABLE "place_path" ENABLE KEYS */;
509

    
510
--
511
-- Table structure for table "plot"
512
--
513

    
514
/*!40101 SET @saved_cs_client     = @@character_set_client */;
515
/*!40101 SET character_set_client = utf8 */;
516
CREATE TABLE "plot" (
517
  "id" text NOT NULL,
518
  "name" text DEFAULT NULL,
519
  "area_m2" double precision DEFAULT NULL,
520
  "bounding_box" text DEFAULT NULL,
521
  PRIMARY KEY ("id"),
522
  /*CONSTRAINT "fk_subplot_place1" FOREIGN KEY ("id") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
523
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
524
/*!40101 SET character_set_client = @saved_cs_client */;
525

    
526
--
527
-- Dumping data for table "plot"
528
--
529

    
530
/*!40000 ALTER TABLE "plot" DISABLE KEYS */;
531
/*!40000 ALTER TABLE "plot" ENABLE KEYS */;
532

    
533
--
534
-- Table structure for table "project"
535
--
536

    
537
/*!40101 SET @saved_cs_client     = @@character_set_client */;
538
/*!40101 SET character_set_client = utf8 */;
539
CREATE TABLE "project" (
540
  "id" text NOT NULL,
541
  "name" text NOT NULL,
542
  "info" hstore DEFAULT NULL,
543
  PRIMARY KEY ("id"),
544
  /*CONSTRAINT "fk_project_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
545
) /*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)'*/;
546
/*!40101 SET character_set_client = @saved_cs_client */;
547

    
548
--
549
-- Dumping data for table "project"
550
--
551

    
552
/*!40000 ALTER TABLE "project" DISABLE KEYS */;
553
/*!40000 ALTER TABLE "project" ENABLE KEYS */;
554

    
555
--
556
-- Table structure for table "record"
557
--
558

    
559
/*!40101 SET @saved_cs_client     = @@character_set_client */;
560
/*!40101 SET character_set_client = utf8 */;
561
CREATE TABLE "record" (
562
  "id" text NOT NULL,
563
  "source" text NOT NULL,
564
  "source_id_scope" text DEFAULT NULL,
565
  "source_record_id" text DEFAULT NULL,
566
  "info" hstore DEFAULT NULL,
567
  PRIMARY KEY ("id"),
568
  /*CONSTRAINT "record_unique" */UNIQUE ("source","source_id_scope","source_record_id"),
569
  /*KEY "fk_record_source1_idx" ("source")*/CHECK (true),
570
  /*CONSTRAINT "fk_record_source1" FOREIGN KEY ("source") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
571
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
572
/*!40101 SET character_set_client = @saved_cs_client */;
573

    
574
--
575
-- Dumping data for table "record"
576
--
577

    
578
/*!40000 ALTER TABLE "record" DISABLE KEYS */;
579
/*!40000 ALTER TABLE "record" ENABLE KEYS */;
580

    
581
--
582
-- Table structure for table "referenced_class"
583
--
584

    
585
/*!40101 SET @saved_cs_client     = @@character_set_client */;
586
/*!40101 SET character_set_client = utf8 */;
587
CREATE TABLE "referenced_class" (
588
  "id" text NOT NULL,
589
  PRIMARY KEY ("id"),
590
  /*CONSTRAINT "fk_example_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
591
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
592
/*!40101 SET character_set_client = @saved_cs_client */;
593

    
594
--
595
-- Dumping data for table "referenced_class"
596
--
597

    
598
/*!40000 ALTER TABLE "referenced_class" DISABLE KEYS */;
599
/*!40000 ALTER TABLE "referenced_class" ENABLE KEYS */;
600

    
601
--
602
-- Table structure for table "relationship"
603
--
604

    
605
/*!40101 SET @saved_cs_client     = @@character_set_client */;
606
/*!40101 SET character_set_client = utf8 */;
607
CREATE TABLE "relationship" (
608
  "id" text NOT NULL,
609
  "record" text NOT NULL,
610
  "related_record" text NOT NULL,
611
  "info" hstore DEFAULT NULL,
612
  PRIMARY KEY ("id"),
613
  /*KEY "fk_relationship_record1_idx" ("record")*/CHECK (true),
614
  /*KEY "fk_relationship_related_record_idx" ("related_record")*/CHECK (true),
615
  /*CONSTRAINT "fk_relationship_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
616
  /*CONSTRAINT "fk_relationship_record2" FOREIGN KEY ("record") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
617
  /*CONSTRAINT "fk_relationship_related_record" FOREIGN KEY ("related_record") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
618
) /*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)'*/;
619
/*!40101 SET character_set_client = @saved_cs_client */;
620

    
621
--
622
-- Dumping data for table "relationship"
623
--
624

    
625
/*!40000 ALTER TABLE "relationship" DISABLE KEYS */;
626
/*!40000 ALTER TABLE "relationship" ENABLE KEYS */;
627

    
628
--
629
-- Table structure for table "soil_observation"
630
--
631

    
632
/*!40101 SET @saved_cs_client     = @@character_set_client */;
633
/*!40101 SET character_set_client = utf8 */;
634
CREATE TABLE "soil_observation" (
635
  "id" text NOT NULL,
636
  "observations" hstore DEFAULT NULL,
637
  PRIMARY KEY ("id"),
638
  /*CONSTRAINT "fk_soil_observation_place_observation1" FOREIGN KEY ("id") REFERENCES "place_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
639
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]''s soil'*/;
640
/*!40101 SET character_set_client = @saved_cs_client */;
641

    
642
--
643
-- Dumping data for table "soil_observation"
644
--
645

    
646
/*!40000 ALTER TABLE "soil_observation" DISABLE KEYS */;
647
/*!40000 ALTER TABLE "soil_observation" ENABLE KEYS */;
648

    
649
--
650
-- Table structure for table "source"
651
--
652

    
653
/*!40101 SET @saved_cs_client     = @@character_set_client */;
654
/*!40101 SET character_set_client = utf8 */;
655
CREATE TABLE "source" (
656
  "id" text NOT NULL,
657
  "parent" text NOT NULL,
658
  "name" text NOT NULL,
659
  "first_publisher" text DEFAULT NULL,
660
  "owner" text DEFAULT NULL,
661
  "info" hstore DEFAULT NULL,
662
  PRIMARY KEY ("id"),
663
  /*CONSTRAINT "source_unique" */UNIQUE ("parent","name"),
664
  /*KEY "fk_source1_idx" ("parent")*/CHECK (true),
665
  /*KEY "fk_source_party1_idx" ("owner")*/CHECK (true),
666
  /*KEY "fk_source_party2_idx" ("first_publisher")*/CHECK (true),
667
  /*CONSTRAINT "fk_source1" FOREIGN KEY ("parent") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
668
  /*CONSTRAINT "fk_source_party1" FOREIGN KEY ("owner") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
669
  /*CONSTRAINT "fk_source_party2" FOREIGN KEY ("first_publisher") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
670
) /*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)'*/;
671
/*!40101 SET character_set_client = @saved_cs_client */;
672

    
673
--
674
-- Dumping data for table "source"
675
--
676

    
677
/*!40000 ALTER TABLE "source" DISABLE KEYS */;
678
/*!40000 ALTER TABLE "source" ENABLE KEYS */;
679

    
680
--
681
-- Table structure for table "specimen"
682
--
683

    
684
/*!40101 SET @saved_cs_client     = @@character_set_client */;
685
/*!40101 SET character_set_client = utf8 */;
686
CREATE TABLE "specimen" (
687
  "id" text NOT NULL,
688
  "individual" text DEFAULT NULL,
689
  "code_in_individual" text DEFAULT NULL,
690
  "collection_event" text DEFAULT NULL,
691
  "orig_collection" text DEFAULT NULL,
692
  "barcode" text DEFAULT NULL,
693
  "accession_number" text DEFAULT NULL,
694
  "specimenholder_institutions" text DEFAULT NULL,
695
  "current_collection" text DEFAULT NULL,
696
  "owner_collection" text DEFAULT NULL,
697
  PRIMARY KEY ("id"),
698
  /*CONSTRAINT "specimen_unique_in_individual" */UNIQUE ("individual","code_in_individual"),
699
  /*CONSTRAINT "specimen_unique_by_collection_event" */UNIQUE ("collection_event"),
700
  /*CONSTRAINT "specimen_unique_in_collection_by_barcode" */UNIQUE ("orig_collection","barcode"),
701
  /*CONSTRAINT "specimen_unique_in_collection_by_accession_number" */UNIQUE ("orig_collection","accession_number"),
702
  /*KEY "fk_specimen_collection1_idx" ("orig_collection")*/CHECK (true),
703
  /*KEY "fk_specimen_taxon_observation1_idx" ("collection_event")*/CHECK (true),
704
  /*KEY "fk_specimen_individual1_idx" ("individual")*/CHECK (true),
705
  /*KEY "fk_specimen_collection2_idx" ("current_collection")*/CHECK (true),
706
  /*KEY "fk_specimen_organization3_idx" ("owner_collection")*/CHECK (true),
707
  /*KEY "fk_specimen_party_list1_idx" ("specimenholder_institutions")*/CHECK (true),
708
  /*CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
709
  /*CONSTRAINT "fk_specimen_collection1" FOREIGN KEY ("orig_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
710
  /*CONSTRAINT "fk_specimen_organization3" FOREIGN KEY ("owner_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
711
  /*CONSTRAINT "fk_specimen_taxon_observation1" FOREIGN KEY ("collection_event") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
712
  /*CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
713
  /*CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
714
  /*CONSTRAINT "fk_specimen_party_list1" FOREIGN KEY ("specimenholder_institutions") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
715
) /*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'*/;
716
/*!40101 SET character_set_client = @saved_cs_client */;
717

    
718
--
719
-- Dumping data for table "specimen"
720
--
721

    
722
/*!40000 ALTER TABLE "specimen" DISABLE KEYS */;
723
/*!40000 ALTER TABLE "specimen" ENABLE KEYS */;
724

    
725
--
726
-- Table structure for table "specimen_observation"
727
--
728

    
729
/*!40101 SET @saved_cs_client     = @@character_set_client */;
730
/*!40101 SET character_set_client = utf8 */;
731
CREATE TABLE "specimen_observation" (
732
  "id" text NOT NULL,
733
  "specimen" text NOT NULL,
734
  "traits" hstore DEFAULT NULL,
735
  PRIMARY KEY ("id"),
736
  /*KEY "fk_specimen_observation_specimen1_idx" ("specimen")*/CHECK (true),
737
  /*CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
738
  /*CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
739
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
740
/*!40101 SET character_set_client = @saved_cs_client */;
741

    
742
--
743
-- Dumping data for table "specimen_observation"
744
--
745

    
746
/*!40000 ALTER TABLE "specimen_observation" DISABLE KEYS */;
747
/*!40000 ALTER TABLE "specimen_observation" ENABLE KEYS */;
748

    
749
--
750
-- Table structure for table "stem"
751
--
752

    
753
/*!40101 SET @saved_cs_client     = @@character_set_client */;
754
/*!40101 SET character_set_client = utf8 */;
755
CREATE TABLE "stem" (
756
  "id" text NOT NULL,
757
  "individual" text NOT NULL,
758
  PRIMARY KEY ("id"),
759
  /*KEY "fk_stem_individual1_idx" ("individual")*/CHECK (true),
760
  /*CONSTRAINT "fk_stem_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
761
  /*CONSTRAINT "fk_stem_individual2" FOREIGN KEY ("id") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
762
) /*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)'*/;
763
/*!40101 SET character_set_client = @saved_cs_client */;
764

    
765
--
766
-- Dumping data for table "stem"
767
--
768

    
769
/*!40000 ALTER TABLE "stem" DISABLE KEYS */;
770
/*!40000 ALTER TABLE "stem" ENABLE KEYS */;
771

    
772
--
773
-- Table structure for table "stem_observation"
774
--
775

    
776
/*!40101 SET @saved_cs_client     = @@character_set_client */;
777
/*!40101 SET character_set_client = utf8 */;
778
CREATE TABLE "stem_observation" (
779
  "id" text NOT NULL,
780
  "individual_observation" text NOT NULL,
781
  "stem" text DEFAULT NULL,
782
  "traits" hstore DEFAULT NULL,
783
  PRIMARY KEY ("id"),
784
  /*CONSTRAINT "stem_observation_unique" */UNIQUE ("individual_observation","stem"),
785
  /*KEY "fk_stem_observation_individual_observation1_idx" ("individual_observation")*/CHECK (true),
786
  /*KEY "fk_stem_observation_stem1_idx" ("stem")*/CHECK (true),
787
  /*CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
788
  /*CONSTRAINT "fk_stem_observation_individual_observation1" FOREIGN KEY ("individual_observation") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
789
  /*CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
790
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of a [[VegCore#Stem|Stem]]'*/;
791
/*!40101 SET character_set_client = @saved_cs_client */;
792

    
793
--
794
-- Dumping data for table "stem_observation"
795
--
796

    
797
/*!40000 ALTER TABLE "stem_observation" DISABLE KEYS */;
798
/*!40000 ALTER TABLE "stem_observation" ENABLE KEYS */;
799

    
800
--
801
-- Table structure for table "stratum"
802
--
803

    
804
/*!40101 SET @saved_cs_client     = @@character_set_client */;
805
/*!40101 SET character_set_client = utf8 */;
806
CREATE TABLE "stratum" (
807
  "id" text NOT NULL,
808
  "name" text NOT NULL,
809
  "info" hstore DEFAULT NULL,
810
  PRIMARY KEY ("id"),
811
  /*CONSTRAINT "fk_place_path_record10" FOREIGN KEY ("id") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
812
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
813
/*!40101 SET character_set_client = @saved_cs_client */;
814

    
815
--
816
-- Dumping data for table "stratum"
817
--
818

    
819
/*!40000 ALTER TABLE "stratum" DISABLE KEYS */;
820
/*!40000 ALTER TABLE "stratum" ENABLE KEYS */;
821

    
822
--
823
-- Table structure for table "subplot"
824
--
825

    
826
/*!40101 SET @saved_cs_client     = @@character_set_client */;
827
/*!40101 SET character_set_client = utf8 */;
828
CREATE TABLE "subplot" (
829
  "id" text NOT NULL,
830
  "x_m" double precision DEFAULT NULL,
831
  "y_m" double precision DEFAULT NULL,
832
  PRIMARY KEY ("id"),
833
  /*CONSTRAINT "fk_subplot_plot1" FOREIGN KEY ("id") REFERENCES "plot" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
834
) /*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)'*/;
835
/*!40101 SET character_set_client = @saved_cs_client */;
836

    
837
--
838
-- Dumping data for table "subplot"
839
--
840

    
841
/*!40000 ALTER TABLE "subplot" DISABLE KEYS */;
842
/*!40000 ALTER TABLE "subplot" ENABLE KEYS */;
843

    
844
--
845
-- Table structure for table "taxon_absence"
846
--
847

    
848
/*!40101 SET @saved_cs_client     = @@character_set_client */;
849
/*!40101 SET character_set_client = utf8 */;
850
CREATE TABLE "taxon_absence" (
851
  "id" text NOT NULL,
852
  "taxon_concept" text NOT NULL,
853
  PRIMARY KEY ("id"),
854
  /*KEY "fk_taxon_presence_taxon_name1_idx" ("taxon_concept")*/CHECK (true),
855
  /*CONSTRAINT "fk_taxon_observation_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
856
  /*CONSTRAINT "fk_taxon_presence_taxon_name10" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
857
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation that a [[VegCore#Taxon|Taxon]]''s does _not_ exist in a place'*/;
858
/*!40101 SET character_set_client = @saved_cs_client */;
859

    
860
--
861
-- Dumping data for table "taxon_absence"
862
--
863

    
864
/*!40000 ALTER TABLE "taxon_absence" DISABLE KEYS */;
865
/*!40000 ALTER TABLE "taxon_absence" ENABLE KEYS */;
866

    
867
--
868
-- Table structure for table "taxon_assertion"
869
--
870

    
871
/*!40101 SET @saved_cs_client     = @@character_set_client */;
872
/*!40101 SET character_set_client = utf8 */;
873
CREATE TABLE "taxon_assertion" (
874
  "id" text NOT NULL,
875
  "string" text NOT NULL /*COMMENT 'for parsed_taxon_assertion, this is the TNRS input name, not the concatenated matched name'*/,
876
  "taxon" text DEFAULT NULL,
877
  "cf_aff" text DEFAULT NULL,
878
  "annotations" hstore DEFAULT NULL,
879
  PRIMARY KEY ("id"),
880
  /*KEY "fk_taxon_assertion_taxon_string1_idx" ("string")*/CHECK (true),
881
  /*KEY "fk_taxon_assertion_taxon_name1_idx" ("taxon")*/CHECK (true),
882
  /*CONSTRAINT "fk_qualified_taxon_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
883
  /*CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
884
  /*CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
885
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
886
/*!40101 SET character_set_client = @saved_cs_client */;
887

    
888
--
889
-- Dumping data for table "taxon_assertion"
890
--
891

    
892
/*!40000 ALTER TABLE "taxon_assertion" DISABLE KEYS */;
893
/*!40000 ALTER TABLE "taxon_assertion" ENABLE KEYS */;
894

    
895
--
896
-- Table structure for table "taxon_concept"
897
--
898

    
899
/*!40101 SET @saved_cs_client     = @@character_set_client */;
900
/*!40101 SET character_set_client = utf8 */;
901
CREATE TABLE "taxon_concept" (
902
  "id" text NOT NULL,
903
  "according_to" text NOT NULL,
904
  "parent" text NOT NULL,
905
  "accepted_taxon_concept" text DEFAULT NULL,
906
  PRIMARY KEY ("id"),
907
  /*CONSTRAINT "taxon_concept_unique_name" */UNIQUE ("according_to"),
908
  /*KEY "fk_taxon_taxon1_idx" ("parent")*/CHECK (true),
909
  /*KEY "fk_taxon_concept_source1_idx" ("according_to")*/CHECK (true),
910
  /*KEY "fk_taxon_concept_taxon_concept1_idx" ("accepted_taxon_concept")*/CHECK (true),
911
  /*CONSTRAINT "fk_taxon_taxon1" FOREIGN KEY ("parent") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
912
  /*CONSTRAINT "fk_taxon_concept_source1" FOREIGN KEY ("according_to") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
913
  /*CONSTRAINT "fk_taxon_concept_taxon_concept1" FOREIGN KEY ("accepted_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
914
  /*CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
915
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A [[VegCore#Taxon|Taxon]] described by a specific [[VegCore#Reference|Reference]]'*/;
916
/*!40101 SET character_set_client = @saved_cs_client */;
917

    
918
--
919
-- Dumping data for table "taxon_concept"
920
--
921

    
922
/*!40000 ALTER TABLE "taxon_concept" DISABLE KEYS */;
923
/*!40000 ALTER TABLE "taxon_concept" ENABLE KEYS */;
924

    
925
--
926
-- Table structure for table "taxon_determination"
927
--
928

    
929
/*!40101 SET @saved_cs_client     = @@character_set_client */;
930
/*!40101 SET character_set_client = utf8 */;
931
CREATE TABLE "taxon_determination" (
932
  "id" text NOT NULL,
933
  "taxon_assertion" text NOT NULL,
934
  "identified_by" text DEFAULT NULL,
935
  "fit_info" hstore DEFAULT NULL,
936
  PRIMARY KEY ("id"),
937
  /*CONSTRAINT "taxon_determination_unique" */UNIQUE ("taxon_assertion","identified_by"),
938
  /*KEY "fk_taxon_occurrence_has_qualified_taxon1_idx" ("taxon_assertion")*/CHECK (true),
939
  /*KEY "fk_taxon_determination_party_list1_idx" ("identified_by")*/CHECK (true),
940
  /*CONSTRAINT "fk_taxon_determination_party_list1" FOREIGN KEY ("identified_by") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
941
  /*CONSTRAINT "fk_taxon_determination_record1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
942
  /*CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
943
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An assertion that a [[VegCore#TaxonOccurrence|TaxonOccurrence]] is a particular [[VegCore#Taxon|Taxon]]'*/;
944
/*!40101 SET character_set_client = @saved_cs_client */;
945

    
946
--
947
-- Dumping data for table "taxon_determination"
948
--
949

    
950
/*!40000 ALTER TABLE "taxon_determination" DISABLE KEYS */;
951
/*!40000 ALTER TABLE "taxon_determination" ENABLE KEYS */;
952

    
953
--
954
-- Table structure for table "taxon_name"
955
--
956

    
957
/*!40101 SET @saved_cs_client     = @@character_set_client */;
958
/*!40101 SET character_set_client = utf8 */;
959
CREATE TABLE "taxon_name" (
960
  "id" text NOT NULL,
961
  "unique_name" text NOT NULL,
962
  "formal_name" text DEFAULT NULL,
963
  "taxon_name" text DEFAULT NULL,
964
  "author" text DEFAULT NULL,
965
  "common_name" text DEFAULT NULL,
966
  "rank" text DEFAULT NULL,
967
  PRIMARY KEY ("id"),
968
  /*KEY "fk_taxon_concept_taxon_string10_idx" ("unique_name")*/CHECK (true),
969
  /*CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
970
  /*CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
971
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
972
/*!40101 SET character_set_client = @saved_cs_client */;
973

    
974
--
975
-- Dumping data for table "taxon_name"
976
--
977

    
978
/*!40000 ALTER TABLE "taxon_name" DISABLE KEYS */;
979
/*!40000 ALTER TABLE "taxon_name" ENABLE KEYS */;
980

    
981
--
982
-- Table structure for table "taxon_observation"
983
--
984

    
985
/*!40101 SET @saved_cs_client     = @@character_set_client */;
986
/*!40101 SET character_set_client = utf8 */;
987
CREATE TABLE "taxon_observation" (
988
  "id" text NOT NULL,
989
  "taxon_occurrence" text NOT NULL,
990
  "collectors" text DEFAULT NULL,
991
  "collector_number" text DEFAULT NULL,
992
  "voucher" text DEFAULT NULL,
993
  "growth_form" text DEFAULT NULL,
994
  "cultivated" integer DEFAULT NULL,
995
  "traits" hstore DEFAULT NULL,
996
  PRIMARY KEY ("id"),
997
  /*KEY "fk_taxon_observation_taxon_occurrence2_idx" ("taxon_occurrence")*/CHECK (true),
998
  /*KEY "fk_taxon_observation_specimen1_idx" ("voucher")*/CHECK (true),
999
  /*KEY "fk_taxon_observation_party_list1_idx" ("collectors")*/CHECK (true),
1000
  /*CONSTRAINT "fk_taxon_observation_taxon_occurrence2" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1001
  /*CONSTRAINT "fk_taxon_observation_party_list1" FOREIGN KEY ("collectors") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1002
  /*CONSTRAINT "fk_taxon_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1003
  /*CONSTRAINT "fk_taxon_observation_specimen1" FOREIGN KEY ("voucher") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1004
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
1005
/*!40101 SET character_set_client = @saved_cs_client */;
1006

    
1007
--
1008
-- Dumping data for table "taxon_observation"
1009
--
1010

    
1011
/*!40000 ALTER TABLE "taxon_observation" DISABLE KEYS */;
1012
/*!40000 ALTER TABLE "taxon_observation" ENABLE KEYS */;
1013

    
1014
--
1015
-- Table structure for table "taxon_occurrence"
1016
--
1017

    
1018
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1019
/*!40101 SET character_set_client = utf8 */;
1020
CREATE TABLE "taxon_occurrence" (
1021
  "id" text NOT NULL,
1022
  "current_determination" text DEFAULT NULL,
1023
  "original_determination" text DEFAULT NULL,
1024
  PRIMARY KEY ("id"),
1025
  /*KEY "fk_taxon_occurrence_taxon_determination1_idx" ("original_determination")*/CHECK (true),
1026
  /*KEY "fk_taxon_occurrence_taxon_determination2_idx" ("current_determination")*/CHECK (true),
1027
  /*CONSTRAINT "fk_taxon_occurrence_taxon_determination1" FOREIGN KEY ("original_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1028
  /*CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1029
  /*CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1030
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Any entity on which [[VegCore#TaxonDetermination|TaxonDetermination]]s can be made'*/;
1031
/*!40101 SET character_set_client = @saved_cs_client */;
1032

    
1033
--
1034
-- Dumping data for table "taxon_occurrence"
1035
--
1036

    
1037
/*!40000 ALTER TABLE "taxon_occurrence" DISABLE KEYS */;
1038
/*!40000 ALTER TABLE "taxon_occurrence" ENABLE KEYS */;
1039

    
1040
--
1041
-- Table structure for table "taxon_path"
1042
--
1043

    
1044
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1045
/*!40101 SET character_set_client = utf8 */;
1046
CREATE TABLE "taxon_path" (
1047
  "id" text NOT NULL,
1048
  "family" text DEFAULT NULL,
1049
  "genus" text DEFAULT NULL,
1050
  "specific_epithet" text DEFAULT NULL,
1051
  "ranks" hstore DEFAULT NULL,
1052
  PRIMARY KEY ("id"),
1053
  /*CONSTRAINT "fk_taxon_path_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1054
) /*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)'*/;
1055
/*!40101 SET character_set_client = @saved_cs_client */;
1056

    
1057
--
1058
-- Dumping data for table "taxon_path"
1059
--
1060

    
1061
/*!40000 ALTER TABLE "taxon_path" DISABLE KEYS */;
1062
/*!40000 ALTER TABLE "taxon_path" ENABLE KEYS */;
1063

    
1064
--
1065
-- Table structure for table "taxon_presence"
1066
--
1067

    
1068
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1069
/*!40101 SET character_set_client = utf8 */;
1070
CREATE TABLE "taxon_presence" (
1071
  "id" text NOT NULL,
1072
  "taxon_concept" text NOT NULL,
1073
  "traits" hstore DEFAULT NULL,
1074
  PRIMARY KEY ("id"),
1075
  /*KEY "fk_taxon_presence_taxon_name1_idx" ("taxon_concept")*/CHECK (true),
1076
  /*CONSTRAINT "fk_taxon_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1077
  /*CONSTRAINT "fk_taxon_presence_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1078
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of just a [[VegCore#Taxon|Taxon]]''s _presence_'*/;
1079
/*!40101 SET character_set_client = @saved_cs_client */;
1080

    
1081
--
1082
-- Dumping data for table "taxon_presence"
1083
--
1084

    
1085
/*!40000 ALTER TABLE "taxon_presence" DISABLE KEYS */;
1086
/*!40000 ALTER TABLE "taxon_presence" ENABLE KEYS */;
1087

    
1088
--
1089
-- Table structure for table "taxon_string"
1090
--
1091

    
1092
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1093
/*!40101 SET character_set_client = utf8 */;
1094
CREATE TABLE "taxon_string" (
1095
  "string" text NOT NULL,
1096
  PRIMARY KEY ("string")
1097
) /*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)'*/;
1098
/*!40101 SET character_set_client = @saved_cs_client */;
1099

    
1100
--
1101
-- Dumping data for table "taxon_string"
1102
--
1103

    
1104
/*!40000 ALTER TABLE "taxon_string" DISABLE KEYS */;
1105
/*!40000 ALTER TABLE "taxon_string" ENABLE KEYS */;
1106

    
1107
--
1108
-- Table structure for table "validatable_place"
1109
--
1110

    
1111
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1112
/*!40101 SET character_set_client = utf8 */;
1113
CREATE TABLE "validatable_place" (
1114
  "id" text NOT NULL,
1115
  "coordinates" text NOT NULL,
1116
  "path" text NOT NULL,
1117
  PRIMARY KEY ("id"),
1118
  /*CONSTRAINT "validatable_place_unique" */UNIQUE ("path","coordinates"),
1119
  /*KEY "fk_geovalidation_place_path1_idx" ("path")*/CHECK (true),
1120
  /*KEY "fk_geovalidation_coordinates1_idx" ("coordinates")*/CHECK (true),
1121
  /*CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1122
  /*CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1123
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
1124
/*!40101 SET character_set_client = @saved_cs_client */;
1125

    
1126
--
1127
-- Dumping data for table "validatable_place"
1128
--
1129

    
1130
/*!40000 ALTER TABLE "validatable_place" DISABLE KEYS */;
1131
/*!40000 ALTER TABLE "validatable_place" ENABLE KEYS */;
1132
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
1133

    
1134
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
1135
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
1136
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
1137
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
1138
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
1139
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1140
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
1141

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