Project

General

Profile

1 8931 aaronmk
SET standard_conforming_strings = off;
2
SET escape_string_warning = off;
3 10468 aaronmk
-- MySQL dump 10.13  Distrib 5.5.32, for debian-linux-gnu (x86_64)
4 8931 aaronmk
--
5 9630 aaronmk
-- Host: localhost    Database: VegCore
6 8931 aaronmk
-- ------------------------------------------------------
7 10468 aaronmk
-- Server version	5.5.32-0ubuntu0.12.04.1
8 10446 aaronmk
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 8931 aaronmk
/*!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 10446 aaronmk
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
18 8931 aaronmk
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
19
20
--
21
-- Table structure for table "aggregate_observation"
22
--
23
24 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
25
/*!40101 SET character_set_client = utf8 */;
26 8931 aaronmk
CREATE TABLE "aggregate_observation" (
27 8944 aaronmk
  "id" text NOT NULL,
28 8938 aaronmk
  "traits" hstore DEFAULT NULL,
29 8931 aaronmk
  PRIMARY KEY ("id"),
30 10458 aaronmk
  /*CONSTRAINT "fk_aggregate_observation_taxon_presence1" FOREIGN KEY ("id") REFERENCES "taxon_presence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
31 10446 aaronmk
) /*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 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
33 8931 aaronmk
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 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
46
/*!40101 SET character_set_client = utf8 */;
47 8931 aaronmk
CREATE TABLE "base_class" (
48 8944 aaronmk
  "id" text NOT NULL,
49
  "referenced_class" text NOT NULL,
50 8931 aaronmk
  PRIMARY KEY ("id"),
51
  /*KEY "fk_base_class_referenced_class1_idx" ("referenced_class")*/CHECK (true),
52 10437 aaronmk
  /*CONSTRAINT "fk_base_class_referenced_class1" FOREIGN KEY ("referenced_class") REFERENCES "referenced_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
53 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
54 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
55 8931 aaronmk
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 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
68
/*!40101 SET character_set_client = utf8 */;
69 8931 aaronmk
CREATE TABLE "collection" (
70 8944 aaronmk
  "id" text NOT NULL,
71
  "institution" text NOT NULL,
72
  "name" text NOT NULL,
73 8931 aaronmk
  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 10468 aaronmk
  /*CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
78
  /*CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
79 10446 aaronmk
) /*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 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
81 8931 aaronmk
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 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
94
/*!40101 SET character_set_client = utf8 */;
95 8931 aaronmk
CREATE TABLE "community" (
96 8944 aaronmk
  "id" text NOT NULL,
97
  "name" text NOT NULL,
98 8938 aaronmk
  "info" hstore DEFAULT NULL,
99 8931 aaronmk
  PRIMARY KEY ("id"),
100
  /*CONSTRAINT "fk_community_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
101 10446 aaronmk
) /*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 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
103 8931 aaronmk
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 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
116
/*!40101 SET character_set_client = utf8 */;
117 8931 aaronmk
CREATE TABLE "derived_class" (
118 8944 aaronmk
  "id" text NOT NULL,
119 8931 aaronmk
  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 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
122 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
123 8931 aaronmk
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 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
136
/*!40101 SET character_set_client = utf8 */;
137 8931 aaronmk
CREATE TABLE "event" (
138 8944 aaronmk
  "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 10454 aaronmk
  "participants" text DEFAULT NULL,
144 8931 aaronmk
  PRIMARY KEY ("id"),
145
  /*KEY "fk_event_place1_idx" ("place")*/CHECK (true),
146
  /*KEY "fk_event1_idx" ("parent")*/CHECK (true),
147 10454 aaronmk
  /*KEY "fk_event_party_list1_idx" ("participants")*/CHECK (true),
148 10468 aaronmk
  /*CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
149 10455 aaronmk
  /*CONSTRAINT "fk_event_party_list1" FOREIGN KEY ("participants") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
150 10460 aaronmk
  /*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 10446 aaronmk
) /*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 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
154 8931 aaronmk
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 10466 aaronmk
-- Table structure for table "geocoordinates"
164
--
165
166
/*!40101 SET @saved_cs_client     = @@character_set_client */;
167
/*!40101 SET character_set_client = utf8 */;
168
CREATE TABLE "geocoordinates" (
169
  "id" text NOT NULL,
170
  "latitude_deg" text DEFAULT NULL,
171
  "longitude_deg" text DEFAULT NULL,
172
  PRIMARY KEY ("id")
173
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A numerically-defined point'*/;
174
/*!40101 SET character_set_client = @saved_cs_client */;
175
176
--
177
-- Dumping data for table "geocoordinates"
178
--
179
180
/*!40000 ALTER TABLE "geocoordinates" DISABLE KEYS */;
181
/*!40000 ALTER TABLE "geocoordinates" ENABLE KEYS */;
182
183
--
184 8931 aaronmk
-- Table structure for table "geological_context"
185
--
186
187 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
188
/*!40101 SET character_set_client = utf8 */;
189 8931 aaronmk
CREATE TABLE "geological_context" (
190 8944 aaronmk
  "id" text NOT NULL,
191
  "name" text NOT NULL,
192 8938 aaronmk
  "info" hstore DEFAULT NULL,
193 8931 aaronmk
  PRIMARY KEY ("id"),
194
  /*CONSTRAINT "fk_geological_context_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
195 10446 aaronmk
) /*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)'*/;
196 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
197 8931 aaronmk
198
--
199
-- Dumping data for table "geological_context"
200
--
201
202
/*!40000 ALTER TABLE "geological_context" DISABLE KEYS */;
203
/*!40000 ALTER TABLE "geological_context" ENABLE KEYS */;
204
205
--
206 10466 aaronmk
-- Table structure for table "geopath"
207
--
208
209
/*!40101 SET @saved_cs_client     = @@character_set_client */;
210
/*!40101 SET character_set_client = utf8 */;
211
CREATE TABLE "geopath" (
212
  "id" text NOT NULL,
213
  "continent" text DEFAULT NULL,
214
  "country" text DEFAULT NULL,
215
  "state_province" text DEFAULT NULL,
216
  "county" text DEFAULT NULL,
217
  "municipality" text DEFAULT NULL,
218
  "ranks" hstore DEFAULT NULL,
219
  PRIMARY KEY ("id")
220
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A named region'*/;
221
/*!40101 SET character_set_client = @saved_cs_client */;
222
223
--
224
-- Dumping data for table "geopath"
225
--
226
227
/*!40000 ALTER TABLE "geopath" DISABLE KEYS */;
228
/*!40000 ALTER TABLE "geopath" ENABLE KEYS */;
229
230
--
231
-- Table structure for table "geovalidatable_place"
232
--
233
234
/*!40101 SET @saved_cs_client     = @@character_set_client */;
235
/*!40101 SET character_set_client = utf8 */;
236
CREATE TABLE "geovalidatable_place" (
237
  "id" text NOT NULL,
238
  "geocoordinates" text NOT NULL,
239
  "geopath" text NOT NULL,
240
  PRIMARY KEY ("id"),
241
  /*CONSTRAINT "validatable_place_unique" */UNIQUE ("geopath","geocoordinates"),
242
  /*KEY "fk_geovalidation_place_path1_idx" ("geopath")*/CHECK (true),
243
  /*KEY "fk_geovalidation_coordinates1_idx" ("geocoordinates")*/CHECK (true),
244 10468 aaronmk
  /*CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("geocoordinates") REFERENCES "geocoordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
245
  /*CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("geopath") REFERENCES "geopath" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
246 10466 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
247
/*!40101 SET character_set_client = @saved_cs_client */;
248
249
--
250
-- Dumping data for table "geovalidatable_place"
251
--
252
253
/*!40000 ALTER TABLE "geovalidatable_place" DISABLE KEYS */;
254
/*!40000 ALTER TABLE "geovalidatable_place" ENABLE KEYS */;
255
256
--
257 8931 aaronmk
-- Table structure for table "geovalidation"
258
--
259
260 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
261
/*!40101 SET character_set_client = utf8 */;
262 8931 aaronmk
CREATE TABLE "geovalidation" (
263 8944 aaronmk
  "id" text NOT NULL,
264 8931 aaronmk
  "geovalid" integer NOT NULL,
265
  "lat_long_domain_valid" integer NOT NULL,
266 10451 aaronmk
  "lat_long_in_place_ranks" hstore DEFAULT NULL,
267 8931 aaronmk
  PRIMARY KEY ("id"),
268 10466 aaronmk
  /*CONSTRAINT "fk_geovalidation_validatable_place1" FOREIGN KEY ("id") REFERENCES "geovalidatable_place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
269 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='The accuracy of the [[VegCore#Coordinates|Coordinates]], taking into account the [[VegCore#Placename|Placename]]'*/;
270 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
271 8931 aaronmk
272
--
273
-- Dumping data for table "geovalidation"
274
--
275
276
/*!40000 ALTER TABLE "geovalidation" DISABLE KEYS */;
277
/*!40000 ALTER TABLE "geovalidation" ENABLE KEYS */;
278
279
--
280
-- Table structure for table "individual"
281
--
282
283 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
284
/*!40101 SET character_set_client = utf8 */;
285 8931 aaronmk
CREATE TABLE "individual" (
286 8944 aaronmk
  "id" text NOT NULL,
287
  "tag" text DEFAULT NULL,
288 10450 aaronmk
  "tag_history" hstore DEFAULT NULL,
289 8931 aaronmk
  PRIMARY KEY ("id"),
290
  /*CONSTRAINT "fk_individual_record1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
291 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A distinct biological organism'*/;
292 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
293 8931 aaronmk
294
--
295
-- Dumping data for table "individual"
296
--
297
298
/*!40000 ALTER TABLE "individual" DISABLE KEYS */;
299
/*!40000 ALTER TABLE "individual" ENABLE KEYS */;
300
301
--
302
-- Table structure for table "individual_observation"
303
--
304
305 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
306
/*!40101 SET character_set_client = utf8 */;
307 8931 aaronmk
CREATE TABLE "individual_observation" (
308 8944 aaronmk
  "id" text NOT NULL,
309
  "individual" text DEFAULT NULL,
310
  "code" text DEFAULT NULL,
311 8938 aaronmk
  "traits" hstore DEFAULT NULL,
312 8931 aaronmk
  PRIMARY KEY ("id"),
313
  /*KEY "fk_individual_observation_individual1_idx" ("individual")*/CHECK (true),
314 10460 aaronmk
  /*CONSTRAINT "fk_individual_observation_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
315
  /*CONSTRAINT "fk_individual_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
316 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of an [[VegCore#Individual|Individual]]'*/;
317 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
318 8931 aaronmk
319
--
320
-- Dumping data for table "individual_observation"
321
--
322
323
/*!40000 ALTER TABLE "individual_observation" DISABLE KEYS */;
324
/*!40000 ALTER TABLE "individual_observation" ENABLE KEYS */;
325
326
--
327
-- Table structure for table "method"
328
--
329
330 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
331
/*!40101 SET character_set_client = utf8 */;
332 8931 aaronmk
CREATE TABLE "method" (
333 8944 aaronmk
  "id" text NOT NULL,
334
  "parent" text NOT NULL,
335 8938 aaronmk
  "info" hstore DEFAULT NULL,
336 8931 aaronmk
  PRIMARY KEY ("id"),
337
  /*KEY "fk_method_method1_idx" ("parent")*/CHECK (true),
338 10468 aaronmk
  /*CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
339
  /*CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
340 10446 aaronmk
) /*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)'*/;
341 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
342 8931 aaronmk
343
--
344
-- Dumping data for table "method"
345
--
346
347
/*!40000 ALTER TABLE "method" DISABLE KEYS */;
348
/*!40000 ALTER TABLE "method" ENABLE KEYS */;
349
350
--
351
-- Table structure for table "organization"
352
--
353
354 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
355
/*!40101 SET character_set_client = utf8 */;
356 8931 aaronmk
CREATE TABLE "organization" (
357 8944 aaronmk
  "id" text NOT NULL,
358 8938 aaronmk
  "info" hstore DEFAULT NULL,
359 8931 aaronmk
  PRIMARY KEY ("id"),
360
  /*CONSTRAINT "fk_organization_party1" FOREIGN KEY ("id") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
361 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
362 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
363 8931 aaronmk
364
--
365
-- Dumping data for table "organization"
366
--
367
368
/*!40000 ALTER TABLE "organization" DISABLE KEYS */;
369
/*!40000 ALTER TABLE "organization" ENABLE KEYS */;
370
371
--
372
-- Table structure for table "parsed_taxon_assertion"
373
--
374
375 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
376
/*!40101 SET character_set_client = utf8 */;
377 8931 aaronmk
CREATE TABLE "parsed_taxon_assertion" (
378 8944 aaronmk
  "id" text NOT NULL,
379
  "matched_taxon_concept" text DEFAULT NULL,
380 8931 aaronmk
  "match_score" float DEFAULT NULL,
381 8938 aaronmk
  "match_info" hstore DEFAULT NULL,
382 8931 aaronmk
  PRIMARY KEY ("id"),
383
  /*KEY "fk_parsed_taxon_assertion_taxon_name1_idx" ("matched_taxon_concept")*/CHECK (true),
384
  /*CONSTRAINT "fk_matched_taxon_qualified_taxon10" FOREIGN KEY ("id") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
385
  /*CONSTRAINT "fk_parsed_taxon_assertion_taxon_name1" FOREIGN KEY ("matched_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
386 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
387 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
388 8931 aaronmk
389
--
390
-- Dumping data for table "parsed_taxon_assertion"
391
--
392
393
/*!40000 ALTER TABLE "parsed_taxon_assertion" DISABLE KEYS */;
394
/*!40000 ALTER TABLE "parsed_taxon_assertion" ENABLE KEYS */;
395
396
--
397
-- Table structure for table "party"
398
--
399
400 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
401
/*!40101 SET character_set_client = utf8 */;
402 8931 aaronmk
CREATE TABLE "party" (
403 8944 aaronmk
  "id" text NOT NULL,
404 10452 aaronmk
  "organization" text DEFAULT NULL,
405 8938 aaronmk
  "info" hstore DEFAULT NULL,
406 8931 aaronmk
  PRIMARY KEY ("id"),
407 10452 aaronmk
  /*KEY "fk_party_organization1_idx" ("organization")*/CHECK (true),
408 10468 aaronmk
  /*CONSTRAINT "fk_collection_source10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
409
  /*CONSTRAINT "fk_party_organization1" FOREIGN KEY ("organization") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
410 10449 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
411 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
412 8931 aaronmk
413
--
414
-- Dumping data for table "party"
415
--
416
417
/*!40000 ALTER TABLE "party" DISABLE KEYS */;
418
/*!40000 ALTER TABLE "party" ENABLE KEYS */;
419
420
--
421 10453 aaronmk
-- Table structure for table "party_list"
422
--
423
424
/*!40101 SET @saved_cs_client     = @@character_set_client */;
425
/*!40101 SET character_set_client = utf8 */;
426
CREATE TABLE "party_list" (
427
  "id" text NOT NULL,
428
  "count" integer NOT NULL,
429
  PRIMARY KEY ("id"),
430
  /*CONSTRAINT "fk_collection_source100" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
431
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
432
/*!40101 SET character_set_client = @saved_cs_client */;
433
434
--
435
-- Dumping data for table "party_list"
436
--
437
438
/*!40000 ALTER TABLE "party_list" DISABLE KEYS */;
439
/*!40000 ALTER TABLE "party_list" ENABLE KEYS */;
440
441
--
442
-- Table structure for table "party_list_entry"
443
--
444
445
/*!40101 SET @saved_cs_client     = @@character_set_client */;
446
/*!40101 SET character_set_client = utf8 */;
447
CREATE TABLE "party_list_entry" (
448
  "id" text NOT NULL,
449
  "entry" text NOT NULL,
450
  "sort_order" integer DEFAULT NULL,
451
  PRIMARY KEY ("id","entry"),
452
  /*KEY "fk_party_list_has_party_party1_idx" ("entry")*/CHECK (true),
453
  /*KEY "fk_party_list_has_party_party_list1_idx" ("id")*/CHECK (true),
454 10468 aaronmk
  /*CONSTRAINT "fk_party_list_has_party_party1" FOREIGN KEY ("entry") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
455
  /*CONSTRAINT "fk_party_list_has_party_party_list1" FOREIGN KEY ("id") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
456 10453 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
457
/*!40101 SET character_set_client = @saved_cs_client */;
458
459
--
460
-- Dumping data for table "party_list_entry"
461
--
462
463
/*!40000 ALTER TABLE "party_list_entry" DISABLE KEYS */;
464
/*!40000 ALTER TABLE "party_list_entry" ENABLE KEYS */;
465
466
--
467 8931 aaronmk
-- Table structure for table "place"
468
--
469
470 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
471
/*!40101 SET character_set_client = utf8 */;
472 8931 aaronmk
CREATE TABLE "place" (
473 8944 aaronmk
  "id" text NOT NULL,
474
  "parent" text NOT NULL,
475 10466 aaronmk
  "geocoordinates" text DEFAULT NULL,
476
  "geopath" text DEFAULT NULL,
477 8944 aaronmk
  "locality" text DEFAULT NULL,
478 8931 aaronmk
  PRIMARY KEY ("id"),
479 10466 aaronmk
  /*KEY "fk_place_coordinates1_idx" ("geocoordinates")*/CHECK (true),
480 8931 aaronmk
  /*KEY "fk_place1_idx" ("parent")*/CHECK (true),
481 10466 aaronmk
  /*KEY "fk_place_place_path1_idx" ("geopath")*/CHECK (true),
482 10468 aaronmk
  /*CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
483 10466 aaronmk
  /*CONSTRAINT "fk_place_coordinates1" FOREIGN KEY ("geocoordinates") REFERENCES "geocoordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
484
  /*CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("geopath") REFERENCES "geopath" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
485
  /*CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
486 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A spatial region" ("DwC":http://rs.tdwg.org/dwc/terms/#dcterms:Location) or point'*/;
487 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
488 8931 aaronmk
489
--
490
-- Dumping data for table "place"
491
--
492
493
/*!40000 ALTER TABLE "place" DISABLE KEYS */;
494
/*!40000 ALTER TABLE "place" ENABLE KEYS */;
495
496
--
497
-- Table structure for table "place_observation"
498
--
499
500 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
501
/*!40101 SET character_set_client = utf8 */;
502 8931 aaronmk
CREATE TABLE "place_observation" (
503 8944 aaronmk
  "id" text NOT NULL,
504
  "place" text NOT NULL,
505 8931 aaronmk
  "elevation_m" double precision DEFAULT NULL,
506
  "slope_incline_deg" double precision DEFAULT NULL,
507
  "slope_direction_deg_N" double precision DEFAULT NULL,
508 8944 aaronmk
  "geological_context" text DEFAULT NULL,
509
  "community" text DEFAULT NULL,
510 8938 aaronmk
  "observations" hstore DEFAULT NULL,
511 8931 aaronmk
  PRIMARY KEY ("id"),
512
  /*KEY "fk_place_observation_place1_idx" ("place")*/CHECK (true),
513
  /*KEY "fk_place_observation_geological_context1_idx" ("geological_context")*/CHECK (true),
514
  /*KEY "fk_place_observation_community1_idx" ("community")*/CHECK (true),
515 10468 aaronmk
  /*CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
516
  /*CONSTRAINT "fk_place_observation_geological_context1" FOREIGN KEY ("geological_context") REFERENCES "geological_context" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
517 10437 aaronmk
  /*CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
518 10460 aaronmk
  /*CONSTRAINT "fk_place_observation_sampling_event1" FOREIGN KEY ("id") REFERENCES "sampling_event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
519 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]'*/;
520 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
521 8931 aaronmk
522
--
523
-- Dumping data for table "place_observation"
524
--
525
526
/*!40000 ALTER TABLE "place_observation" DISABLE KEYS */;
527
/*!40000 ALTER TABLE "place_observation" ENABLE KEYS */;
528
529
--
530
-- Table structure for table "plot"
531
--
532
533 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
534
/*!40101 SET character_set_client = utf8 */;
535 8931 aaronmk
CREATE TABLE "plot" (
536 8944 aaronmk
  "id" text NOT NULL,
537
  "name" text DEFAULT NULL,
538 8931 aaronmk
  "area_m2" double precision DEFAULT NULL,
539 10463 aaronmk
  "shape" text DEFAULT NULL,
540
  "bounding_box_rect" text DEFAULT NULL,
541 10462 aaronmk
  "footprint_geom_WKT" text DEFAULT NULL,
542 10465 aaronmk
  "dimensions" hstore DEFAULT NULL,
543 8931 aaronmk
  PRIMARY KEY ("id"),
544
  /*CONSTRAINT "fk_subplot_place1" FOREIGN KEY ("id") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
545 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
546 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
547 8931 aaronmk
548
--
549
-- Dumping data for table "plot"
550
--
551
552
/*!40000 ALTER TABLE "plot" DISABLE KEYS */;
553
/*!40000 ALTER TABLE "plot" ENABLE KEYS */;
554
555
--
556
-- Table structure for table "project"
557
--
558
559 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
560
/*!40101 SET character_set_client = utf8 */;
561 8931 aaronmk
CREATE TABLE "project" (
562 8944 aaronmk
  "id" text NOT NULL,
563
  "name" text NOT NULL,
564 8938 aaronmk
  "info" hstore DEFAULT NULL,
565 8931 aaronmk
  PRIMARY KEY ("id"),
566
  /*CONSTRAINT "fk_project_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
567 10446 aaronmk
) /*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)'*/;
568 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
569 8931 aaronmk
570
--
571
-- Dumping data for table "project"
572
--
573
574
/*!40000 ALTER TABLE "project" DISABLE KEYS */;
575
/*!40000 ALTER TABLE "project" ENABLE KEYS */;
576
577
--
578
-- Table structure for table "record"
579
--
580
581 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
582
/*!40101 SET character_set_client = utf8 */;
583 8931 aaronmk
CREATE TABLE "record" (
584 8944 aaronmk
  "id" text NOT NULL,
585
  "source" text NOT NULL,
586
  "source_id_scope" text DEFAULT NULL,
587
  "source_record_id" text DEFAULT NULL,
588 8938 aaronmk
  "info" hstore DEFAULT NULL,
589 8931 aaronmk
  PRIMARY KEY ("id"),
590
  /*CONSTRAINT "record_unique" */UNIQUE ("source","source_id_scope","source_record_id"),
591
  /*KEY "fk_record_source1_idx" ("source")*/CHECK (true),
592
  /*CONSTRAINT "fk_record_source1" FOREIGN KEY ("source") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
593 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
594 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
595 8931 aaronmk
596
--
597
-- Dumping data for table "record"
598
--
599
600
/*!40000 ALTER TABLE "record" DISABLE KEYS */;
601
/*!40000 ALTER TABLE "record" ENABLE KEYS */;
602
603
--
604
-- Table structure for table "referenced_class"
605
--
606
607 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
608
/*!40101 SET character_set_client = utf8 */;
609 8931 aaronmk
CREATE TABLE "referenced_class" (
610 8944 aaronmk
  "id" text NOT NULL,
611 8931 aaronmk
  PRIMARY KEY ("id"),
612
  /*CONSTRAINT "fk_example_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
613 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
614 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
615 8931 aaronmk
616
--
617
-- Dumping data for table "referenced_class"
618
--
619
620
/*!40000 ALTER TABLE "referenced_class" DISABLE KEYS */;
621
/*!40000 ALTER TABLE "referenced_class" ENABLE KEYS */;
622
623
--
624
-- Table structure for table "relationship"
625
--
626
627 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
628
/*!40101 SET character_set_client = utf8 */;
629 8931 aaronmk
CREATE TABLE "relationship" (
630 8944 aaronmk
  "id" text NOT NULL,
631
  "record" text NOT NULL,
632
  "related_record" text NOT NULL,
633 8938 aaronmk
  "info" hstore DEFAULT NULL,
634 8931 aaronmk
  PRIMARY KEY ("id"),
635
  /*KEY "fk_relationship_record1_idx" ("record")*/CHECK (true),
636
  /*KEY "fk_relationship_related_record_idx" ("related_record")*/CHECK (true),
637
  /*CONSTRAINT "fk_relationship_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
638
  /*CONSTRAINT "fk_relationship_record2" FOREIGN KEY ("record") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
639
  /*CONSTRAINT "fk_relationship_related_record" FOREIGN KEY ("related_record") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
640 10446 aaronmk
) /*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)'*/;
641 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
642 8931 aaronmk
643
--
644
-- Dumping data for table "relationship"
645
--
646
647
/*!40000 ALTER TABLE "relationship" DISABLE KEYS */;
648
/*!40000 ALTER TABLE "relationship" ENABLE KEYS */;
649
650
--
651 10460 aaronmk
-- Table structure for table "sampling_event"
652
--
653
654
/*!40101 SET @saved_cs_client     = @@character_set_client */;
655
/*!40101 SET character_set_client = utf8 */;
656
CREATE TABLE "sampling_event" (
657
  "id" text NOT NULL,
658
  "method" text DEFAULT NULL,
659
  PRIMARY KEY ("id"),
660
  /*KEY "fk_sampling_event_method1_idx" ("method")*/CHECK (true),
661 10468 aaronmk
  /*CONSTRAINT "fk_project_event10" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
662
  /*CONSTRAINT "fk_sampling_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
663 10460 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
664
/*!40101 SET character_set_client = @saved_cs_client */;
665
666
--
667
-- Dumping data for table "sampling_event"
668
--
669
670
/*!40000 ALTER TABLE "sampling_event" DISABLE KEYS */;
671
/*!40000 ALTER TABLE "sampling_event" ENABLE KEYS */;
672
673
--
674 8931 aaronmk
-- Table structure for table "soil_observation"
675
--
676
677 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
678
/*!40101 SET character_set_client = utf8 */;
679 8931 aaronmk
CREATE TABLE "soil_observation" (
680 8944 aaronmk
  "id" text NOT NULL,
681 8938 aaronmk
  "observations" hstore DEFAULT NULL,
682 8931 aaronmk
  PRIMARY KEY ("id"),
683
  /*CONSTRAINT "fk_soil_observation_place_observation1" FOREIGN KEY ("id") REFERENCES "place_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
684 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]''s soil'*/;
685 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
686 8931 aaronmk
687
--
688
-- Dumping data for table "soil_observation"
689
--
690
691
/*!40000 ALTER TABLE "soil_observation" DISABLE KEYS */;
692
/*!40000 ALTER TABLE "soil_observation" ENABLE KEYS */;
693
694
--
695
-- Table structure for table "source"
696
--
697
698 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
699
/*!40101 SET character_set_client = utf8 */;
700 8931 aaronmk
CREATE TABLE "source" (
701 8944 aaronmk
  "id" text NOT NULL,
702
  "parent" text NOT NULL,
703
  "name" text NOT NULL,
704
  "first_publisher" text DEFAULT NULL,
705
  "owner" text DEFAULT NULL,
706 8938 aaronmk
  "info" hstore DEFAULT NULL,
707 8931 aaronmk
  PRIMARY KEY ("id"),
708
  /*CONSTRAINT "source_unique" */UNIQUE ("parent","name"),
709
  /*KEY "fk_source1_idx" ("parent")*/CHECK (true),
710 9617 aaronmk
  /*KEY "fk_source_party1_idx" ("owner")*/CHECK (true),
711 8931 aaronmk
  /*KEY "fk_source_party2_idx" ("first_publisher")*/CHECK (true),
712
  /*CONSTRAINT "fk_source1" FOREIGN KEY ("parent") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
713
  /*CONSTRAINT "fk_source_party1" FOREIGN KEY ("owner") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
714
  /*CONSTRAINT "fk_source_party2" FOREIGN KEY ("first_publisher") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
715 10446 aaronmk
) /*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)'*/;
716 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
717 8931 aaronmk
718
--
719
-- Dumping data for table "source"
720
--
721
722
/*!40000 ALTER TABLE "source" DISABLE KEYS */;
723
/*!40000 ALTER TABLE "source" ENABLE KEYS */;
724
725
--
726
-- Table structure for table "specimen"
727
--
728
729 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
730
/*!40101 SET character_set_client = utf8 */;
731 8931 aaronmk
CREATE TABLE "specimen" (
732 8944 aaronmk
  "id" text NOT NULL,
733
  "individual" text DEFAULT NULL,
734
  "code_in_individual" text DEFAULT NULL,
735
  "collection_event" text DEFAULT NULL,
736
  "orig_collection" text DEFAULT NULL,
737
  "barcode" text DEFAULT NULL,
738
  "accession_number" text DEFAULT NULL,
739 10454 aaronmk
  "specimenholder_institutions" text DEFAULT NULL,
740 8944 aaronmk
  "current_collection" text DEFAULT NULL,
741
  "owner_collection" text DEFAULT NULL,
742 8931 aaronmk
  PRIMARY KEY ("id"),
743
  /*CONSTRAINT "specimen_unique_in_individual" */UNIQUE ("individual","code_in_individual"),
744
  /*CONSTRAINT "specimen_unique_by_collection_event" */UNIQUE ("collection_event"),
745
  /*CONSTRAINT "specimen_unique_in_collection_by_barcode" */UNIQUE ("orig_collection","barcode"),
746
  /*CONSTRAINT "specimen_unique_in_collection_by_accession_number" */UNIQUE ("orig_collection","accession_number"),
747
  /*KEY "fk_specimen_collection1_idx" ("orig_collection")*/CHECK (true),
748
  /*KEY "fk_specimen_taxon_observation1_idx" ("collection_event")*/CHECK (true),
749
  /*KEY "fk_specimen_individual1_idx" ("individual")*/CHECK (true),
750
  /*KEY "fk_specimen_collection2_idx" ("current_collection")*/CHECK (true),
751
  /*KEY "fk_specimen_organization3_idx" ("owner_collection")*/CHECK (true),
752 10454 aaronmk
  /*KEY "fk_specimen_party_list1_idx" ("specimenholder_institutions")*/CHECK (true),
753 10468 aaronmk
  /*CONSTRAINT "fk_specimen_collection1" FOREIGN KEY ("orig_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
754
  /*CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
755
  /*CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
756 8931 aaronmk
  /*CONSTRAINT "fk_specimen_organization3" FOREIGN KEY ("owner_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
757 10468 aaronmk
  /*CONSTRAINT "fk_specimen_party_list1" FOREIGN KEY ("specimenholder_institutions") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
758 8931 aaronmk
  /*CONSTRAINT "fk_specimen_taxon_observation1" FOREIGN KEY ("collection_event") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
759 10460 aaronmk
  /*CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
760 10446 aaronmk
) /*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'*/;
761 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
762 8931 aaronmk
763
--
764
-- Dumping data for table "specimen"
765
--
766
767
/*!40000 ALTER TABLE "specimen" DISABLE KEYS */;
768
/*!40000 ALTER TABLE "specimen" ENABLE KEYS */;
769
770
--
771
-- Table structure for table "specimen_observation"
772
--
773
774 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
775
/*!40101 SET character_set_client = utf8 */;
776 8931 aaronmk
CREATE TABLE "specimen_observation" (
777 8944 aaronmk
  "id" text NOT NULL,
778
  "specimen" text NOT NULL,
779 8938 aaronmk
  "traits" hstore DEFAULT NULL,
780 8931 aaronmk
  PRIMARY KEY ("id"),
781
  /*KEY "fk_specimen_observation_specimen1_idx" ("specimen")*/CHECK (true),
782 10468 aaronmk
  /*CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
783
  /*CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
784 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
785 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
786 8931 aaronmk
787
--
788
-- Dumping data for table "specimen_observation"
789
--
790
791
/*!40000 ALTER TABLE "specimen_observation" DISABLE KEYS */;
792
/*!40000 ALTER TABLE "specimen_observation" ENABLE KEYS */;
793
794
--
795
-- Table structure for table "stem"
796
--
797
798 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
799
/*!40101 SET character_set_client = utf8 */;
800 8931 aaronmk
CREATE TABLE "stem" (
801 8944 aaronmk
  "id" text NOT NULL,
802
  "individual" text NOT NULL,
803 8931 aaronmk
  PRIMARY KEY ("id"),
804
  /*KEY "fk_stem_individual1_idx" ("individual")*/CHECK (true),
805
  /*CONSTRAINT "fk_stem_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
806
  /*CONSTRAINT "fk_stem_individual2" FOREIGN KEY ("id") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
807 10446 aaronmk
) /*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)'*/;
808 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
809 8931 aaronmk
810
--
811
-- Dumping data for table "stem"
812
--
813
814
/*!40000 ALTER TABLE "stem" DISABLE KEYS */;
815
/*!40000 ALTER TABLE "stem" ENABLE KEYS */;
816
817
--
818
-- Table structure for table "stem_observation"
819
--
820
821 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
822
/*!40101 SET character_set_client = utf8 */;
823 8931 aaronmk
CREATE TABLE "stem_observation" (
824 8944 aaronmk
  "id" text NOT NULL,
825
  "individual_observation" text NOT NULL,
826
  "stem" text DEFAULT NULL,
827 8938 aaronmk
  "traits" hstore DEFAULT NULL,
828 8931 aaronmk
  PRIMARY KEY ("id"),
829
  /*CONSTRAINT "stem_observation_unique" */UNIQUE ("individual_observation","stem"),
830
  /*KEY "fk_stem_observation_individual_observation1_idx" ("individual_observation")*/CHECK (true),
831
  /*KEY "fk_stem_observation_stem1_idx" ("stem")*/CHECK (true),
832
  /*CONSTRAINT "fk_stem_observation_individual_observation1" FOREIGN KEY ("individual_observation") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
833 10468 aaronmk
  /*CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
834
  /*CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
835 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of a [[VegCore#Stem|Stem]]'*/;
836 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
837 8931 aaronmk
838
--
839
-- Dumping data for table "stem_observation"
840
--
841
842
/*!40000 ALTER TABLE "stem_observation" DISABLE KEYS */;
843
/*!40000 ALTER TABLE "stem_observation" ENABLE KEYS */;
844
845
--
846
-- Table structure for table "stratum"
847
--
848
849 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
850
/*!40101 SET character_set_client = utf8 */;
851 8931 aaronmk
CREATE TABLE "stratum" (
852 8944 aaronmk
  "id" text NOT NULL,
853
  "name" text NOT NULL,
854 8938 aaronmk
  "info" hstore DEFAULT NULL,
855 8931 aaronmk
  PRIMARY KEY ("id"),
856
  /*CONSTRAINT "fk_place_path_record10" FOREIGN KEY ("id") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
857 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
858 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
859 8931 aaronmk
860
--
861
-- Dumping data for table "stratum"
862
--
863
864
/*!40000 ALTER TABLE "stratum" DISABLE KEYS */;
865
/*!40000 ALTER TABLE "stratum" ENABLE KEYS */;
866
867
--
868
-- Table structure for table "subplot"
869
--
870
871 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
872
/*!40101 SET character_set_client = utf8 */;
873 8931 aaronmk
CREATE TABLE "subplot" (
874 8944 aaronmk
  "id" text NOT NULL,
875 8931 aaronmk
  "x_m" double precision DEFAULT NULL,
876
  "y_m" double precision DEFAULT NULL,
877 10465 aaronmk
  "coordinates" hstore DEFAULT NULL,
878 8931 aaronmk
  PRIMARY KEY ("id"),
879
  /*CONSTRAINT "fk_subplot_plot1" FOREIGN KEY ("id") REFERENCES "plot" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
880 10446 aaronmk
) /*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)'*/;
881 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
882 8931 aaronmk
883
--
884
-- Dumping data for table "subplot"
885
--
886
887
/*!40000 ALTER TABLE "subplot" DISABLE KEYS */;
888
/*!40000 ALTER TABLE "subplot" ENABLE KEYS */;
889
890
--
891 10457 aaronmk
-- Table structure for table "taxon_absence"
892
--
893
894
/*!40101 SET @saved_cs_client     = @@character_set_client */;
895
/*!40101 SET character_set_client = utf8 */;
896
CREATE TABLE "taxon_absence" (
897
  "id" text NOT NULL,
898
  "taxon_concept" text NOT NULL,
899
  PRIMARY KEY ("id"),
900
  /*KEY "fk_taxon_presence_taxon_name1_idx" ("taxon_concept")*/CHECK (true),
901
  /*CONSTRAINT "fk_taxon_observation_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
902
  /*CONSTRAINT "fk_taxon_presence_taxon_name10" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
903
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation that a [[VegCore#Taxon|Taxon]]''s does _not_ exist in a place'*/;
904
/*!40101 SET character_set_client = @saved_cs_client */;
905
906
--
907
-- Dumping data for table "taxon_absence"
908
--
909
910
/*!40000 ALTER TABLE "taxon_absence" DISABLE KEYS */;
911
/*!40000 ALTER TABLE "taxon_absence" ENABLE KEYS */;
912
913
--
914 8931 aaronmk
-- Table structure for table "taxon_assertion"
915
--
916
917 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
918
/*!40101 SET character_set_client = utf8 */;
919 8931 aaronmk
CREATE TABLE "taxon_assertion" (
920 8944 aaronmk
  "id" text NOT NULL,
921 10446 aaronmk
  "string" text NOT NULL /*COMMENT 'for parsed_taxon_assertion, this is the TNRS input name, not the concatenated matched name'*/,
922 8944 aaronmk
  "taxon" text DEFAULT NULL,
923
  "cf_aff" text DEFAULT NULL,
924 8938 aaronmk
  "annotations" hstore DEFAULT NULL,
925 8931 aaronmk
  PRIMARY KEY ("id"),
926
  /*KEY "fk_taxon_assertion_taxon_string1_idx" ("string")*/CHECK (true),
927
  /*KEY "fk_taxon_assertion_taxon_name1_idx" ("taxon")*/CHECK (true),
928
  /*CONSTRAINT "fk_qualified_taxon_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
929 10468 aaronmk
  /*CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
930
  /*CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
931 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
932 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
933 8931 aaronmk
934
--
935
-- Dumping data for table "taxon_assertion"
936
--
937
938
/*!40000 ALTER TABLE "taxon_assertion" DISABLE KEYS */;
939
/*!40000 ALTER TABLE "taxon_assertion" ENABLE KEYS */;
940
941
--
942
-- Table structure for table "taxon_concept"
943
--
944
945 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
946
/*!40101 SET character_set_client = utf8 */;
947 8931 aaronmk
CREATE TABLE "taxon_concept" (
948 8944 aaronmk
  "id" text NOT NULL,
949
  "according_to" text NOT NULL,
950
  "parent" text NOT NULL,
951
  "accepted_taxon_concept" text DEFAULT NULL,
952 8931 aaronmk
  PRIMARY KEY ("id"),
953
  /*CONSTRAINT "taxon_concept_unique_name" */UNIQUE ("according_to"),
954
  /*KEY "fk_taxon_taxon1_idx" ("parent")*/CHECK (true),
955
  /*KEY "fk_taxon_concept_source1_idx" ("according_to")*/CHECK (true),
956
  /*KEY "fk_taxon_concept_taxon_concept1_idx" ("accepted_taxon_concept")*/CHECK (true),
957
  /*CONSTRAINT "fk_taxon_concept_source1" FOREIGN KEY ("according_to") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
958
  /*CONSTRAINT "fk_taxon_concept_taxon_concept1" FOREIGN KEY ("accepted_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
959 10468 aaronmk
  /*CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
960
  /*CONSTRAINT "fk_taxon_taxon1" FOREIGN KEY ("parent") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
961 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A [[VegCore#Taxon|Taxon]] described by a specific [[VegCore#Reference|Reference]]'*/;
962 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
963 8931 aaronmk
964
--
965
-- Dumping data for table "taxon_concept"
966
--
967
968
/*!40000 ALTER TABLE "taxon_concept" DISABLE KEYS */;
969
/*!40000 ALTER TABLE "taxon_concept" ENABLE KEYS */;
970
971
--
972
-- Table structure for table "taxon_determination"
973
--
974
975 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
976
/*!40101 SET character_set_client = utf8 */;
977 8931 aaronmk
CREATE TABLE "taxon_determination" (
978 8944 aaronmk
  "id" text NOT NULL,
979
  "taxon_assertion" text NOT NULL,
980
  "identified_by" text DEFAULT NULL,
981 8938 aaronmk
  "fit_info" hstore DEFAULT NULL,
982 8931 aaronmk
  PRIMARY KEY ("id"),
983
  /*CONSTRAINT "taxon_determination_unique" */UNIQUE ("taxon_assertion","identified_by"),
984
  /*KEY "fk_taxon_occurrence_has_qualified_taxon1_idx" ("taxon_assertion")*/CHECK (true),
985 10455 aaronmk
  /*KEY "fk_taxon_determination_party_list1_idx" ("identified_by")*/CHECK (true),
986 10468 aaronmk
  /*CONSTRAINT "fk_taxon_determination_party_list1" FOREIGN KEY ("identified_by") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
987 8931 aaronmk
  /*CONSTRAINT "fk_taxon_determination_record1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
988 10468 aaronmk
  /*CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
989 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An assertion that a [[VegCore#TaxonOccurrence|TaxonOccurrence]] is a particular [[VegCore#Taxon|Taxon]]'*/;
990 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
991 8931 aaronmk
992
--
993
-- Dumping data for table "taxon_determination"
994
--
995
996
/*!40000 ALTER TABLE "taxon_determination" DISABLE KEYS */;
997
/*!40000 ALTER TABLE "taxon_determination" ENABLE KEYS */;
998
999
--
1000
-- Table structure for table "taxon_name"
1001
--
1002
1003 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1004
/*!40101 SET character_set_client = utf8 */;
1005 8931 aaronmk
CREATE TABLE "taxon_name" (
1006 8944 aaronmk
  "id" text NOT NULL,
1007
  "unique_name" text NOT NULL,
1008
  "formal_name" text DEFAULT NULL,
1009
  "taxon_name" text DEFAULT NULL,
1010
  "author" text DEFAULT NULL,
1011
  "common_name" text DEFAULT NULL,
1012
  "rank" text DEFAULT NULL,
1013 8931 aaronmk
  PRIMARY KEY ("id"),
1014
  /*KEY "fk_taxon_concept_taxon_string10_idx" ("unique_name")*/CHECK (true),
1015 10468 aaronmk
  /*CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1016
  /*CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1017 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
1018 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
1019 8931 aaronmk
1020
--
1021
-- Dumping data for table "taxon_name"
1022
--
1023
1024
/*!40000 ALTER TABLE "taxon_name" DISABLE KEYS */;
1025
/*!40000 ALTER TABLE "taxon_name" ENABLE KEYS */;
1026
1027
--
1028
-- Table structure for table "taxon_observation"
1029
--
1030
1031 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1032
/*!40101 SET character_set_client = utf8 */;
1033 8931 aaronmk
CREATE TABLE "taxon_observation" (
1034 8944 aaronmk
  "id" text NOT NULL,
1035
  "taxon_occurrence" text NOT NULL,
1036 10455 aaronmk
  "collectors" text DEFAULT NULL,
1037 8944 aaronmk
  "collector_number" text DEFAULT NULL,
1038
  "voucher" text DEFAULT NULL,
1039
  "growth_form" text DEFAULT NULL,
1040 8931 aaronmk
  "cultivated" integer DEFAULT NULL,
1041 8938 aaronmk
  "traits" hstore DEFAULT NULL,
1042 8931 aaronmk
  PRIMARY KEY ("id"),
1043
  /*KEY "fk_taxon_observation_taxon_occurrence2_idx" ("taxon_occurrence")*/CHECK (true),
1044
  /*KEY "fk_taxon_observation_specimen1_idx" ("voucher")*/CHECK (true),
1045 10455 aaronmk
  /*KEY "fk_taxon_observation_party_list1_idx" ("collectors")*/CHECK (true),
1046 10457 aaronmk
  /*CONSTRAINT "fk_taxon_observation_party_list1" FOREIGN KEY ("collectors") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1047 10460 aaronmk
  /*CONSTRAINT "fk_taxon_observation_sampling_event1" FOREIGN KEY ("id") REFERENCES "sampling_event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1048
  /*CONSTRAINT "fk_taxon_observation_specimen1" FOREIGN KEY ("voucher") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1049
  /*CONSTRAINT "fk_taxon_observation_taxon_occurrence2" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1050 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/;
1051 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
1052 8931 aaronmk
1053
--
1054
-- Dumping data for table "taxon_observation"
1055
--
1056
1057
/*!40000 ALTER TABLE "taxon_observation" DISABLE KEYS */;
1058
/*!40000 ALTER TABLE "taxon_observation" ENABLE KEYS */;
1059
1060
--
1061
-- Table structure for table "taxon_occurrence"
1062
--
1063
1064 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1065
/*!40101 SET character_set_client = utf8 */;
1066 8931 aaronmk
CREATE TABLE "taxon_occurrence" (
1067 8944 aaronmk
  "id" text NOT NULL,
1068
  "current_determination" text DEFAULT NULL,
1069
  "original_determination" text DEFAULT NULL,
1070 8931 aaronmk
  PRIMARY KEY ("id"),
1071
  /*KEY "fk_taxon_occurrence_taxon_determination1_idx" ("original_determination")*/CHECK (true),
1072
  /*KEY "fk_taxon_occurrence_taxon_determination2_idx" ("current_determination")*/CHECK (true),
1073 10468 aaronmk
  /*CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1074 8931 aaronmk
  /*CONSTRAINT "fk_taxon_occurrence_taxon_determination1" FOREIGN KEY ("original_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1075 10468 aaronmk
  /*CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1076 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Any entity on which [[VegCore#TaxonDetermination|TaxonDetermination]]s can be made'*/;
1077 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
1078 8931 aaronmk
1079
--
1080
-- Dumping data for table "taxon_occurrence"
1081
--
1082
1083
/*!40000 ALTER TABLE "taxon_occurrence" DISABLE KEYS */;
1084
/*!40000 ALTER TABLE "taxon_occurrence" ENABLE KEYS */;
1085
1086
--
1087
-- Table structure for table "taxon_path"
1088
--
1089
1090 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1091
/*!40101 SET character_set_client = utf8 */;
1092 8931 aaronmk
CREATE TABLE "taxon_path" (
1093 8944 aaronmk
  "id" text NOT NULL,
1094
  "family" text DEFAULT NULL,
1095
  "genus" text DEFAULT NULL,
1096
  "specific_epithet" text DEFAULT NULL,
1097 8938 aaronmk
  "ranks" hstore DEFAULT NULL,
1098 8931 aaronmk
  PRIMARY KEY ("id"),
1099
  /*CONSTRAINT "fk_taxon_path_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1100 10446 aaronmk
) /*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)'*/;
1101 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
1102 8931 aaronmk
1103
--
1104
-- Dumping data for table "taxon_path"
1105
--
1106
1107
/*!40000 ALTER TABLE "taxon_path" DISABLE KEYS */;
1108
/*!40000 ALTER TABLE "taxon_path" ENABLE KEYS */;
1109
1110
--
1111
-- Table structure for table "taxon_presence"
1112
--
1113
1114 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1115
/*!40101 SET character_set_client = utf8 */;
1116 8931 aaronmk
CREATE TABLE "taxon_presence" (
1117 8944 aaronmk
  "id" text NOT NULL,
1118
  "taxon_concept" text NOT NULL,
1119 8938 aaronmk
  "traits" hstore DEFAULT NULL,
1120 8931 aaronmk
  PRIMARY KEY ("id"),
1121
  /*KEY "fk_taxon_presence_taxon_name1_idx" ("taxon_concept")*/CHECK (true),
1122
  /*CONSTRAINT "fk_taxon_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1123
  /*CONSTRAINT "fk_taxon_presence_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1124 10446 aaronmk
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of just a [[VegCore#Taxon|Taxon]]''s _presence_'*/;
1125 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
1126 8931 aaronmk
1127
--
1128
-- Dumping data for table "taxon_presence"
1129
--
1130
1131
/*!40000 ALTER TABLE "taxon_presence" DISABLE KEYS */;
1132
/*!40000 ALTER TABLE "taxon_presence" ENABLE KEYS */;
1133
1134
--
1135
-- Table structure for table "taxon_string"
1136
--
1137
1138 9630 aaronmk
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1139
/*!40101 SET character_set_client = utf8 */;
1140 8931 aaronmk
CREATE TABLE "taxon_string" (
1141 8944 aaronmk
  "string" text NOT NULL,
1142 10438 aaronmk
  PRIMARY KEY ("string")
1143 10449 aaronmk
) /*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)'*/;
1144 9630 aaronmk
/*!40101 SET character_set_client = @saved_cs_client */;
1145 8931 aaronmk
1146
--
1147
-- Dumping data for table "taxon_string"
1148
--
1149
1150
/*!40000 ALTER TABLE "taxon_string" DISABLE KEYS */;
1151
/*!40000 ALTER TABLE "taxon_string" ENABLE KEYS */;
1152
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
1153
1154
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
1155
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
1156
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
1157 10446 aaronmk
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
1158
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
1159
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1160 8931 aaronmk
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
1161
1162
-- Dump completed