Project

General

Profile

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