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