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