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