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