Project

General

Profile

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