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