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