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