Project

General

Profile

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