Revision 9630
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/VegCore/VegCore.my.sql | ||
---|---|---|
1 |
-- MySQL dump 10.11
|
|
1 |
-- MySQL dump 10.13 Distrib 5.5.31, for debian-linux-gnu (x86_64)
|
|
2 | 2 |
-- |
3 |
-- Host: vegbiendev.nceas.ucsb.edu Database: VegCore
|
|
3 |
-- Host: localhost Database: VegCore
|
|
4 | 4 |
-- ------------------------------------------------------ |
5 | 5 |
-- Server version 5.5.31-0ubuntu0.12.04.1 |
6 | 6 |
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; |
... | ... | |
14 | 14 |
-- Table structure for table "aggregate_observation" |
15 | 15 |
-- |
16 | 16 |
|
17 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
18 |
/*!40101 SET character_set_client = utf8 */; |
|
17 | 19 |
CREATE TABLE "aggregate_observation" ( |
18 | 20 |
"id" varbinary(767) NOT NULL, |
19 | 21 |
"taxon_concept" varbinary(767) NOT NULL, |
... | ... | |
23 | 25 |
CONSTRAINT "fk_aggregate_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
24 | 26 |
CONSTRAINT "fk_aggregate_observation_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
25 | 27 |
); |
28 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
26 | 29 |
|
27 | 30 |
-- |
28 | 31 |
-- Dumping data for table "aggregate_observation" |
... | ... | |
35 | 38 |
-- Table structure for table "base_class" |
36 | 39 |
-- |
37 | 40 |
|
41 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
42 |
/*!40101 SET character_set_client = utf8 */; |
|
38 | 43 |
CREATE TABLE "base_class" ( |
39 | 44 |
"id" varbinary(767) NOT NULL, |
40 | 45 |
"referenced_class" varbinary(767) NOT NULL, |
... | ... | |
43 | 48 |
CONSTRAINT "fk_example_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
44 | 49 |
CONSTRAINT "fk_base_class_referenced_class1" FOREIGN KEY ("referenced_class") REFERENCES "referenced_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
45 | 50 |
); |
51 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
46 | 52 |
|
47 | 53 |
-- |
48 | 54 |
-- Dumping data for table "base_class" |
... | ... | |
55 | 61 |
-- Table structure for table "collection" |
56 | 62 |
-- |
57 | 63 |
|
64 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
65 |
/*!40101 SET character_set_client = utf8 */; |
|
58 | 66 |
CREATE TABLE "collection" ( |
59 | 67 |
"id" varbinary(767) NOT NULL, |
60 | 68 |
"institution" varbinary(767) NOT NULL, |
... | ... | |
66 | 74 |
CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
67 | 75 |
CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
68 | 76 |
); |
77 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
69 | 78 |
|
70 | 79 |
-- |
71 | 80 |
-- Dumping data for table "collection" |
... | ... | |
78 | 87 |
-- Table structure for table "community" |
79 | 88 |
-- |
80 | 89 |
|
90 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
91 |
/*!40101 SET character_set_client = utf8 */; |
|
81 | 92 |
CREATE TABLE "community" ( |
82 | 93 |
"id" varbinary(767) NOT NULL, |
83 | 94 |
"name" varbinary(767) NOT NULL, |
... | ... | |
85 | 96 |
PRIMARY KEY ("id"), |
86 | 97 |
CONSTRAINT "fk_community_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
87 | 98 |
); |
99 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
88 | 100 |
|
89 | 101 |
-- |
90 | 102 |
-- Dumping data for table "community" |
... | ... | |
97 | 109 |
-- Table structure for table "coordinates" |
98 | 110 |
-- |
99 | 111 |
|
112 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
113 |
/*!40101 SET character_set_client = utf8 */; |
|
100 | 114 |
CREATE TABLE "coordinates" ( |
101 | 115 |
"id" varbinary(767) NOT NULL, |
102 | 116 |
"latitude_deg" varbinary(767) DEFAULT NULL, |
103 | 117 |
"longitude_deg" varbinary(767) DEFAULT NULL, |
104 | 118 |
PRIMARY KEY ("id") |
105 | 119 |
); |
120 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
106 | 121 |
|
107 | 122 |
-- |
108 | 123 |
-- Dumping data for table "coordinates" |
... | ... | |
115 | 130 |
-- Table structure for table "derived_class" |
116 | 131 |
-- |
117 | 132 |
|
133 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
134 |
/*!40101 SET character_set_client = utf8 */; |
|
118 | 135 |
CREATE TABLE "derived_class" ( |
119 | 136 |
"id" varbinary(767) NOT NULL, |
120 | 137 |
PRIMARY KEY ("id"), |
121 | 138 |
CONSTRAINT "fk_derived_class_base_class1" FOREIGN KEY ("id") REFERENCES "base_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
122 | 139 |
); |
140 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
123 | 141 |
|
124 | 142 |
-- |
125 | 143 |
-- Dumping data for table "derived_class" |
... | ... | |
132 | 150 |
-- Table structure for table "event" |
133 | 151 |
-- |
134 | 152 |
|
153 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
154 |
/*!40101 SET character_set_client = utf8 */; |
|
135 | 155 |
CREATE TABLE "event" ( |
136 | 156 |
"id" varbinary(767) NOT NULL, |
137 | 157 |
"parent" varbinary(767) NOT NULL, |
... | ... | |
148 | 168 |
CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
149 | 169 |
CONSTRAINT "fk_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
150 | 170 |
); |
171 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
151 | 172 |
|
152 | 173 |
-- |
153 | 174 |
-- Dumping data for table "event" |
... | ... | |
160 | 181 |
-- Table structure for table "event_participant" |
161 | 182 |
-- |
162 | 183 |
|
184 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
185 |
/*!40101 SET character_set_client = utf8 */; |
|
163 | 186 |
CREATE TABLE "event_participant" ( |
164 | 187 |
"event" varbinary(767) NOT NULL, |
165 | 188 |
"party" varbinary(767) NOT NULL, |
... | ... | |
170 | 193 |
CONSTRAINT "fk_event_has_party_event1" FOREIGN KEY ("event") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
171 | 194 |
CONSTRAINT "fk_event_has_party_party1" FOREIGN KEY ("party") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
172 | 195 |
); |
196 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
173 | 197 |
|
174 | 198 |
-- |
175 | 199 |
-- Dumping data for table "event_participant" |
... | ... | |
182 | 206 |
-- Table structure for table "geological_context" |
183 | 207 |
-- |
184 | 208 |
|
209 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
210 |
/*!40101 SET character_set_client = utf8 */; |
|
185 | 211 |
CREATE TABLE "geological_context" ( |
186 | 212 |
"id" varbinary(767) NOT NULL, |
187 | 213 |
"name" varbinary(767) NOT NULL, |
... | ... | |
189 | 215 |
PRIMARY KEY ("id"), |
190 | 216 |
CONSTRAINT "fk_geological_context_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
191 | 217 |
); |
218 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
192 | 219 |
|
193 | 220 |
-- |
194 | 221 |
-- Dumping data for table "geological_context" |
... | ... | |
201 | 228 |
-- Table structure for table "geovalidation" |
202 | 229 |
-- |
203 | 230 |
|
231 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
232 |
/*!40101 SET character_set_client = utf8 */; |
|
204 | 233 |
CREATE TABLE "geovalidation" ( |
205 | 234 |
"id" varbinary(767) NOT NULL, |
206 | 235 |
"geovalid" tinyint(1) NOT NULL, |
... | ... | |
209 | 238 |
PRIMARY KEY ("id"), |
210 | 239 |
CONSTRAINT "fk_geovalidation_validatable_place1" FOREIGN KEY ("id") REFERENCES "validatable_place" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
211 | 240 |
); |
241 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
212 | 242 |
|
213 | 243 |
-- |
214 | 244 |
-- Dumping data for table "geovalidation" |
... | ... | |
221 | 251 |
-- Table structure for table "individual" |
222 | 252 |
-- |
223 | 253 |
|
254 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
255 |
/*!40101 SET character_set_client = utf8 */; |
|
224 | 256 |
CREATE TABLE "individual" ( |
225 | 257 |
"id" varbinary(767) NOT NULL, |
226 | 258 |
"tag" varbinary(767) DEFAULT NULL, |
227 | 259 |
PRIMARY KEY ("id"), |
228 | 260 |
CONSTRAINT "fk_individual_record1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
229 | 261 |
); |
262 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
230 | 263 |
|
231 | 264 |
-- |
232 | 265 |
-- Dumping data for table "individual" |
... | ... | |
239 | 272 |
-- Table structure for table "individual_observation" |
240 | 273 |
-- |
241 | 274 |
|
275 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
276 |
/*!40101 SET character_set_client = utf8 */; |
|
242 | 277 |
CREATE TABLE "individual_observation" ( |
243 | 278 |
"id" varbinary(767) NOT NULL, |
244 | 279 |
"individual" varbinary(767) DEFAULT NULL, |
... | ... | |
249 | 284 |
CONSTRAINT "fk_individual_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
250 | 285 |
CONSTRAINT "fk_individual_observation_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
251 | 286 |
); |
287 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
252 | 288 |
|
253 | 289 |
-- |
254 | 290 |
-- Dumping data for table "individual_observation" |
... | ... | |
261 | 297 |
-- Table structure for table "method" |
262 | 298 |
-- |
263 | 299 |
|
300 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
301 |
/*!40101 SET character_set_client = utf8 */; |
|
264 | 302 |
CREATE TABLE "method" ( |
265 | 303 |
"id" varbinary(767) NOT NULL, |
266 | 304 |
"parent" varbinary(767) NOT NULL, |
... | ... | |
270 | 308 |
CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
271 | 309 |
CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
272 | 310 |
); |
311 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
273 | 312 |
|
274 | 313 |
-- |
275 | 314 |
-- Dumping data for table "method" |
... | ... | |
282 | 321 |
-- Table structure for table "organization" |
283 | 322 |
-- |
284 | 323 |
|
324 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
325 |
/*!40101 SET character_set_client = utf8 */; |
|
285 | 326 |
CREATE TABLE "organization" ( |
286 | 327 |
"id" varbinary(767) NOT NULL, |
287 | 328 |
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
288 | 329 |
PRIMARY KEY ("id"), |
289 | 330 |
CONSTRAINT "fk_organization_party1" FOREIGN KEY ("id") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
290 | 331 |
); |
332 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
291 | 333 |
|
292 | 334 |
-- |
293 | 335 |
-- Dumping data for table "organization" |
... | ... | |
300 | 342 |
-- Table structure for table "parsed_taxon_assertion" |
301 | 343 |
-- |
302 | 344 |
|
345 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
346 |
/*!40101 SET character_set_client = utf8 */; |
|
303 | 347 |
CREATE TABLE "parsed_taxon_assertion" ( |
304 | 348 |
"id" varbinary(767) NOT NULL, |
305 | 349 |
"matched_taxon_concept" varbinary(767) DEFAULT NULL, |
... | ... | |
310 | 354 |
CONSTRAINT "fk_matched_taxon_qualified_taxon10" FOREIGN KEY ("id") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
311 | 355 |
CONSTRAINT "fk_parsed_taxon_assertion_taxon_name1" FOREIGN KEY ("matched_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
312 | 356 |
); |
357 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
313 | 358 |
|
314 | 359 |
-- |
315 | 360 |
-- Dumping data for table "parsed_taxon_assertion" |
... | ... | |
322 | 367 |
-- Table structure for table "party" |
323 | 368 |
-- |
324 | 369 |
|
370 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
371 |
/*!40101 SET character_set_client = utf8 */; |
|
325 | 372 |
CREATE TABLE "party" ( |
326 | 373 |
"id" varbinary(767) NOT NULL, |
327 | 374 |
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
328 | 375 |
PRIMARY KEY ("id"), |
329 | 376 |
CONSTRAINT "fk_collection_source10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
330 | 377 |
); |
378 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
331 | 379 |
|
332 | 380 |
-- |
333 | 381 |
-- Dumping data for table "party" |
... | ... | |
340 | 388 |
-- Table structure for table "place" |
341 | 389 |
-- |
342 | 390 |
|
391 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
392 |
/*!40101 SET character_set_client = utf8 */; |
|
343 | 393 |
CREATE TABLE "place" ( |
344 | 394 |
"id" varbinary(767) NOT NULL, |
345 | 395 |
"parent" varbinary(767) NOT NULL, |
... | ... | |
355 | 405 |
CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
356 | 406 |
CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
357 | 407 |
); |
408 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
358 | 409 |
|
359 | 410 |
-- |
360 | 411 |
-- Dumping data for table "place" |
... | ... | |
367 | 418 |
-- Table structure for table "place_observation" |
368 | 419 |
-- |
369 | 420 |
|
421 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
422 |
/*!40101 SET character_set_client = utf8 */; |
|
370 | 423 |
CREATE TABLE "place_observation" ( |
371 | 424 |
"id" varbinary(767) NOT NULL, |
372 | 425 |
"place" varbinary(767) NOT NULL, |
... | ... | |
386 | 439 |
CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
387 | 440 |
CONSTRAINT "fk_place_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
388 | 441 |
); |
442 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
389 | 443 |
|
390 | 444 |
-- |
391 | 445 |
-- Dumping data for table "place_observation" |
... | ... | |
398 | 452 |
-- Table structure for table "place_path" |
399 | 453 |
-- |
400 | 454 |
|
455 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
456 |
/*!40101 SET character_set_client = utf8 */; |
|
401 | 457 |
CREATE TABLE "place_path" ( |
402 | 458 |
"id" varbinary(767) NOT NULL, |
403 | 459 |
"continent" varbinary(767) DEFAULT NULL, |
... | ... | |
408 | 464 |
"ranks" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
409 | 465 |
PRIMARY KEY ("id") |
410 | 466 |
); |
467 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
411 | 468 |
|
412 | 469 |
-- |
413 | 470 |
-- Dumping data for table "place_path" |
... | ... | |
420 | 477 |
-- Table structure for table "plot" |
421 | 478 |
-- |
422 | 479 |
|
480 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
481 |
/*!40101 SET character_set_client = utf8 */; |
|
423 | 482 |
CREATE TABLE "plot" ( |
424 | 483 |
"id" varbinary(767) NOT NULL, |
425 | 484 |
"name" varbinary(767) DEFAULT NULL, |
... | ... | |
428 | 487 |
PRIMARY KEY ("id"), |
429 | 488 |
CONSTRAINT "fk_subplot_place1" FOREIGN KEY ("id") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
430 | 489 |
); |
490 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
431 | 491 |
|
432 | 492 |
-- |
433 | 493 |
-- Dumping data for table "plot" |
... | ... | |
440 | 500 |
-- Table structure for table "project" |
441 | 501 |
-- |
442 | 502 |
|
503 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
504 |
/*!40101 SET character_set_client = utf8 */; |
|
443 | 505 |
CREATE TABLE "project" ( |
444 | 506 |
"id" varbinary(767) NOT NULL, |
445 | 507 |
"name" varbinary(767) NOT NULL, |
... | ... | |
447 | 509 |
PRIMARY KEY ("id"), |
448 | 510 |
CONSTRAINT "fk_project_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
449 | 511 |
); |
512 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
450 | 513 |
|
451 | 514 |
-- |
452 | 515 |
-- Dumping data for table "project" |
... | ... | |
459 | 522 |
-- Table structure for table "record" |
460 | 523 |
-- |
461 | 524 |
|
525 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
526 |
/*!40101 SET character_set_client = utf8 */; |
|
462 | 527 |
CREATE TABLE "record" ( |
463 | 528 |
"id" varbinary(767) NOT NULL, |
464 | 529 |
"source" varbinary(767) NOT NULL, |
... | ... | |
470 | 535 |
KEY "fk_record_source1_idx" ("source"), |
471 | 536 |
CONSTRAINT "fk_record_source1" FOREIGN KEY ("source") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
472 | 537 |
); |
538 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
473 | 539 |
|
474 | 540 |
-- |
475 | 541 |
-- Dumping data for table "record" |
... | ... | |
482 | 548 |
-- Table structure for table "referenced_class" |
483 | 549 |
-- |
484 | 550 |
|
551 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
552 |
/*!40101 SET character_set_client = utf8 */; |
|
485 | 553 |
CREATE TABLE "referenced_class" ( |
486 | 554 |
"id" varbinary(767) NOT NULL, |
487 | 555 |
PRIMARY KEY ("id"), |
488 | 556 |
CONSTRAINT "fk_example_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
489 | 557 |
); |
558 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
490 | 559 |
|
491 | 560 |
-- |
492 | 561 |
-- Dumping data for table "referenced_class" |
... | ... | |
499 | 568 |
-- Table structure for table "relationship" |
500 | 569 |
-- |
501 | 570 |
|
571 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
572 |
/*!40101 SET character_set_client = utf8 */; |
|
502 | 573 |
CREATE TABLE "relationship" ( |
503 | 574 |
"id" varbinary(767) NOT NULL, |
504 | 575 |
"record" varbinary(767) NOT NULL, |
... | ... | |
511 | 582 |
CONSTRAINT "fk_relationship_record2" FOREIGN KEY ("record") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
512 | 583 |
CONSTRAINT "fk_relationship_related_record" FOREIGN KEY ("related_record") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
513 | 584 |
); |
585 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
514 | 586 |
|
515 | 587 |
-- |
516 | 588 |
-- Dumping data for table "relationship" |
... | ... | |
523 | 595 |
-- Table structure for table "soil_observation" |
524 | 596 |
-- |
525 | 597 |
|
598 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
599 |
/*!40101 SET character_set_client = utf8 */; |
|
526 | 600 |
CREATE TABLE "soil_observation" ( |
527 | 601 |
"id" varbinary(767) NOT NULL, |
528 | 602 |
"observations" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
529 | 603 |
PRIMARY KEY ("id"), |
530 | 604 |
CONSTRAINT "fk_soil_observation_place_observation1" FOREIGN KEY ("id") REFERENCES "place_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
531 | 605 |
); |
606 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
532 | 607 |
|
533 | 608 |
-- |
534 | 609 |
-- Dumping data for table "soil_observation" |
... | ... | |
541 | 616 |
-- Table structure for table "source" |
542 | 617 |
-- |
543 | 618 |
|
619 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
620 |
/*!40101 SET character_set_client = utf8 */; |
|
544 | 621 |
CREATE TABLE "source" ( |
545 | 622 |
"id" varbinary(767) NOT NULL, |
546 | 623 |
"parent" varbinary(767) NOT NULL, |
... | ... | |
557 | 634 |
CONSTRAINT "fk_source_party1" FOREIGN KEY ("owner") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
558 | 635 |
CONSTRAINT "fk_source_party2" FOREIGN KEY ("first_publisher") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
559 | 636 |
); |
637 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
560 | 638 |
|
561 | 639 |
-- |
562 | 640 |
-- Dumping data for table "source" |
... | ... | |
569 | 647 |
-- Table structure for table "specimen" |
570 | 648 |
-- |
571 | 649 |
|
650 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
651 |
/*!40101 SET character_set_client = utf8 */; |
|
572 | 652 |
CREATE TABLE "specimen" ( |
573 | 653 |
"id" varbinary(767) NOT NULL, |
574 | 654 |
"individual" varbinary(767) DEFAULT NULL, |
... | ... | |
596 | 676 |
CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
597 | 677 |
CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
598 | 678 |
); |
679 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
599 | 680 |
|
600 | 681 |
-- |
601 | 682 |
-- Dumping data for table "specimen" |
... | ... | |
608 | 689 |
-- Table structure for table "specimen_observation" |
609 | 690 |
-- |
610 | 691 |
|
692 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
693 |
/*!40101 SET character_set_client = utf8 */; |
|
611 | 694 |
CREATE TABLE "specimen_observation" ( |
612 | 695 |
"id" varbinary(767) NOT NULL, |
613 | 696 |
"specimen" varbinary(767) NOT NULL, |
... | ... | |
617 | 700 |
CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
618 | 701 |
CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
619 | 702 |
); |
703 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
620 | 704 |
|
621 | 705 |
-- |
622 | 706 |
-- Dumping data for table "specimen_observation" |
... | ... | |
629 | 713 |
-- Table structure for table "specimenholder_institution" |
630 | 714 |
-- |
631 | 715 |
|
716 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
717 |
/*!40101 SET character_set_client = utf8 */; |
|
632 | 718 |
CREATE TABLE "specimenholder_institution" ( |
633 | 719 |
"specimen" varbinary(767) NOT NULL, |
634 | 720 |
"institution" varbinary(767) NOT NULL, |
... | ... | |
639 | 725 |
CONSTRAINT "fk_specimen_has_organization_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
640 | 726 |
CONSTRAINT "fk_specimen_has_organization_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
641 | 727 |
); |
728 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
642 | 729 |
|
643 | 730 |
-- |
644 | 731 |
-- Dumping data for table "specimenholder_institution" |
... | ... | |
651 | 738 |
-- Table structure for table "stem" |
652 | 739 |
-- |
653 | 740 |
|
741 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
742 |
/*!40101 SET character_set_client = utf8 */; |
|
654 | 743 |
CREATE TABLE "stem" ( |
655 | 744 |
"id" varbinary(767) NOT NULL, |
656 | 745 |
"individual" varbinary(767) NOT NULL, |
... | ... | |
659 | 748 |
CONSTRAINT "fk_stem_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
660 | 749 |
CONSTRAINT "fk_stem_individual2" FOREIGN KEY ("id") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
661 | 750 |
); |
751 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
662 | 752 |
|
663 | 753 |
-- |
664 | 754 |
-- Dumping data for table "stem" |
... | ... | |
671 | 761 |
-- Table structure for table "stem_observation" |
672 | 762 |
-- |
673 | 763 |
|
764 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
765 |
/*!40101 SET character_set_client = utf8 */; |
|
674 | 766 |
CREATE TABLE "stem_observation" ( |
675 | 767 |
"id" varbinary(767) NOT NULL, |
676 | 768 |
"individual_observation" varbinary(767) NOT NULL, |
... | ... | |
684 | 776 |
CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
685 | 777 |
CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
686 | 778 |
); |
779 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
687 | 780 |
|
688 | 781 |
-- |
689 | 782 |
-- Dumping data for table "stem_observation" |
... | ... | |
696 | 789 |
-- Table structure for table "stratum" |
697 | 790 |
-- |
698 | 791 |
|
792 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
793 |
/*!40101 SET character_set_client = utf8 */; |
|
699 | 794 |
CREATE TABLE "stratum" ( |
700 | 795 |
"id" varbinary(767) NOT NULL, |
701 | 796 |
"name" varbinary(767) NOT NULL, |
... | ... | |
703 | 798 |
PRIMARY KEY ("id"), |
704 | 799 |
CONSTRAINT "fk_place_path_record10" FOREIGN KEY ("id") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
705 | 800 |
); |
801 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
706 | 802 |
|
707 | 803 |
-- |
708 | 804 |
-- Dumping data for table "stratum" |
... | ... | |
715 | 811 |
-- Table structure for table "subplot" |
716 | 812 |
-- |
717 | 813 |
|
814 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
815 |
/*!40101 SET character_set_client = utf8 */; |
|
718 | 816 |
CREATE TABLE "subplot" ( |
719 | 817 |
"id" varbinary(767) NOT NULL, |
720 | 818 |
"x_m" double DEFAULT NULL, |
... | ... | |
722 | 820 |
PRIMARY KEY ("id"), |
723 | 821 |
CONSTRAINT "fk_subplot_plot1" FOREIGN KEY ("id") REFERENCES "plot" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
724 | 822 |
); |
823 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
725 | 824 |
|
726 | 825 |
-- |
727 | 826 |
-- Dumping data for table "subplot" |
... | ... | |
734 | 833 |
-- Table structure for table "taxon_assertion" |
735 | 834 |
-- |
736 | 835 |
|
836 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
837 |
/*!40101 SET character_set_client = utf8 */; |
|
737 | 838 |
CREATE TABLE "taxon_assertion" ( |
738 | 839 |
"id" varbinary(767) NOT NULL, |
739 | 840 |
"string" varbinary(767) NOT NULL, |
... | ... | |
747 | 848 |
CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE, |
748 | 849 |
CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
749 | 850 |
); |
851 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
750 | 852 |
|
751 | 853 |
-- |
752 | 854 |
-- Dumping data for table "taxon_assertion" |
... | ... | |
759 | 861 |
-- Table structure for table "taxon_concept" |
760 | 862 |
-- |
761 | 863 |
|
864 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
865 |
/*!40101 SET character_set_client = utf8 */; |
|
762 | 866 |
CREATE TABLE "taxon_concept" ( |
763 | 867 |
"id" varbinary(767) NOT NULL, |
764 | 868 |
"according_to" varbinary(767) NOT NULL, |
... | ... | |
774 | 878 |
CONSTRAINT "fk_taxon_concept_taxon_concept1" FOREIGN KEY ("accepted_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
775 | 879 |
CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
776 | 880 |
); |
881 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
777 | 882 |
|
778 | 883 |
-- |
779 | 884 |
-- Dumping data for table "taxon_concept" |
... | ... | |
786 | 891 |
-- Table structure for table "taxon_determination" |
787 | 892 |
-- |
788 | 893 |
|
894 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
895 |
/*!40101 SET character_set_client = utf8 */; |
|
789 | 896 |
CREATE TABLE "taxon_determination" ( |
790 | 897 |
"id" varbinary(767) NOT NULL, |
791 | 898 |
"taxon_assertion" varbinary(767) NOT NULL, |
... | ... | |
799 | 906 |
CONSTRAINT "fk_taxon_determination_record1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
800 | 907 |
CONSTRAINT "fk_taxon_determination_party1" FOREIGN KEY ("identified_by") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
801 | 908 |
); |
909 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
802 | 910 |
|
803 | 911 |
-- |
804 | 912 |
-- Dumping data for table "taxon_determination" |
... | ... | |
811 | 919 |
-- Table structure for table "taxon_name" |
812 | 920 |
-- |
813 | 921 |
|
922 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
923 |
/*!40101 SET character_set_client = utf8 */; |
|
814 | 924 |
CREATE TABLE "taxon_name" ( |
815 | 925 |
"id" varbinary(767) NOT NULL, |
816 | 926 |
"unique_name" varbinary(767) NOT NULL, |
... | ... | |
824 | 934 |
CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
825 | 935 |
CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE |
826 | 936 |
); |
937 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
827 | 938 |
|
828 | 939 |
-- |
829 | 940 |
-- Dumping data for table "taxon_name" |
... | ... | |
836 | 947 |
-- Table structure for table "taxon_observation" |
837 | 948 |
-- |
838 | 949 |
|
950 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
951 |
/*!40101 SET character_set_client = utf8 */; |
|
839 | 952 |
CREATE TABLE "taxon_observation" ( |
840 | 953 |
"id" varbinary(767) NOT NULL, |
841 | 954 |
"taxon_occurrence" varbinary(767) NOT NULL, |
... | ... | |
854 | 967 |
CONSTRAINT "fk_taxon_observation_specimen1" FOREIGN KEY ("voucher") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
855 | 968 |
CONSTRAINT "fk_taxon_observation_party1" FOREIGN KEY ("collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
856 | 969 |
); |
970 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
857 | 971 |
|
858 | 972 |
-- |
859 | 973 |
-- Dumping data for table "taxon_observation" |
... | ... | |
866 | 980 |
-- Table structure for table "taxon_occurrence" |
867 | 981 |
-- |
868 | 982 |
|
983 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
984 |
/*!40101 SET character_set_client = utf8 */; |
|
869 | 985 |
CREATE TABLE "taxon_occurrence" ( |
870 | 986 |
"id" varbinary(767) NOT NULL, |
871 | 987 |
"current_determination" varbinary(767) DEFAULT NULL, |
... | ... | |
877 | 993 |
CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
878 | 994 |
CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
879 | 995 |
); |
996 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
880 | 997 |
|
881 | 998 |
-- |
882 | 999 |
-- Dumping data for table "taxon_occurrence" |
... | ... | |
889 | 1006 |
-- Table structure for table "taxon_path" |
890 | 1007 |
-- |
891 | 1008 |
|
1009 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
1010 |
/*!40101 SET character_set_client = utf8 */; |
|
892 | 1011 |
CREATE TABLE "taxon_path" ( |
893 | 1012 |
"id" varbinary(767) NOT NULL, |
894 | 1013 |
"family" varbinary(767) DEFAULT NULL, |
... | ... | |
898 | 1017 |
PRIMARY KEY ("id"), |
899 | 1018 |
CONSTRAINT "fk_taxon_path_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
900 | 1019 |
); |
1020 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
901 | 1021 |
|
902 | 1022 |
-- |
903 | 1023 |
-- Dumping data for table "taxon_path" |
... | ... | |
910 | 1030 |
-- Table structure for table "taxon_presence" |
911 | 1031 |
-- |
912 | 1032 |
|
1033 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
1034 |
/*!40101 SET character_set_client = utf8 */; |
|
913 | 1035 |
CREATE TABLE "taxon_presence" ( |
914 | 1036 |
"id" varbinary(767) NOT NULL, |
915 | 1037 |
"taxon_concept" varbinary(767) NOT NULL, |
... | ... | |
919 | 1041 |
CONSTRAINT "fk_taxon_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
920 | 1042 |
CONSTRAINT "fk_taxon_presence_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
921 | 1043 |
); |
1044 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
922 | 1045 |
|
923 | 1046 |
-- |
924 | 1047 |
-- Dumping data for table "taxon_presence" |
... | ... | |
931 | 1054 |
-- Table structure for table "taxon_string" |
932 | 1055 |
-- |
933 | 1056 |
|
1057 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
1058 |
/*!40101 SET character_set_client = utf8 */; |
|
934 | 1059 |
CREATE TABLE "taxon_string" ( |
935 | 1060 |
"string" varbinary(767) NOT NULL, |
936 | 1061 |
"parsed_taxon_assertion" varbinary(767) DEFAULT NULL, |
... | ... | |
938 | 1063 |
KEY "fk_taxon_string_parsed_taxon_assertion1_idx" ("parsed_taxon_assertion"), |
939 | 1064 |
CONSTRAINT "fk_taxon_string_parsed_taxon_assertion1" FOREIGN KEY ("parsed_taxon_assertion") REFERENCES "parsed_taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
940 | 1065 |
); |
1066 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
941 | 1067 |
|
942 | 1068 |
-- |
943 | 1069 |
-- Dumping data for table "taxon_string" |
... | ... | |
950 | 1076 |
-- Table structure for table "validatable_place" |
951 | 1077 |
-- |
952 | 1078 |
|
1079 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
1080 |
/*!40101 SET character_set_client = utf8 */; |
|
953 | 1081 |
CREATE TABLE "validatable_place" ( |
954 | 1082 |
"id" varbinary(767) NOT NULL, |
955 | 1083 |
"coordinates" varbinary(767) NOT NULL, |
... | ... | |
961 | 1089 |
CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
962 | 1090 |
CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
963 | 1091 |
); |
1092 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
964 | 1093 |
|
965 | 1094 |
-- |
966 | 1095 |
-- Dumping data for table "validatable_place" |
schemas/VegCore/VegCore.pg.sql | ||
---|---|---|
1 | 1 |
SET standard_conforming_strings = off; |
2 | 2 |
SET escape_string_warning = off; |
3 |
-- MySQL dump 10.11
|
|
3 |
-- MySQL dump 10.13 Distrib 5.5.31, for debian-linux-gnu (x86_64)
|
|
4 | 4 |
-- |
5 |
-- Host: vegbiendev.nceas.ucsb.edu Database: VegCore
|
|
5 |
-- Host: localhost Database: VegCore
|
|
6 | 6 |
-- ------------------------------------------------------ |
7 | 7 |
-- Server version 5.5.31-0ubuntu0.12.04.1 |
8 | 8 |
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; |
... | ... | |
16 | 16 |
-- Table structure for table "aggregate_observation" |
17 | 17 |
-- |
18 | 18 |
|
19 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
20 |
/*!40101 SET character_set_client = utf8 */; |
|
19 | 21 |
CREATE TABLE "aggregate_observation" ( |
20 | 22 |
"id" text NOT NULL, |
21 | 23 |
"taxon_concept" text NOT NULL, |
... | ... | |
25 | 27 |
/*CONSTRAINT "fk_aggregate_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
26 | 28 |
/*CONSTRAINT "fk_aggregate_observation_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
27 | 29 |
); |
30 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
28 | 31 |
|
29 | 32 |
-- |
30 | 33 |
-- Dumping data for table "aggregate_observation" |
... | ... | |
37 | 40 |
-- Table structure for table "base_class" |
38 | 41 |
-- |
39 | 42 |
|
43 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
44 |
/*!40101 SET character_set_client = utf8 */; |
|
40 | 45 |
CREATE TABLE "base_class" ( |
41 | 46 |
"id" text NOT NULL, |
42 | 47 |
"referenced_class" text NOT NULL, |
... | ... | |
45 | 50 |
/*CONSTRAINT "fk_example_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
46 | 51 |
/*CONSTRAINT "fk_base_class_referenced_class1" FOREIGN KEY ("referenced_class") REFERENCES "referenced_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
47 | 52 |
); |
53 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
48 | 54 |
|
49 | 55 |
-- |
50 | 56 |
-- Dumping data for table "base_class" |
... | ... | |
57 | 63 |
-- Table structure for table "collection" |
58 | 64 |
-- |
59 | 65 |
|
66 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
67 |
/*!40101 SET character_set_client = utf8 */; |
|
60 | 68 |
CREATE TABLE "collection" ( |
61 | 69 |
"id" text NOT NULL, |
62 | 70 |
"institution" text NOT NULL, |
... | ... | |
68 | 76 |
/*CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
69 | 77 |
/*CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
70 | 78 |
); |
79 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
71 | 80 |
|
72 | 81 |
-- |
73 | 82 |
-- Dumping data for table "collection" |
... | ... | |
80 | 89 |
-- Table structure for table "community" |
81 | 90 |
-- |
82 | 91 |
|
92 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
93 |
/*!40101 SET character_set_client = utf8 */; |
|
83 | 94 |
CREATE TABLE "community" ( |
84 | 95 |
"id" text NOT NULL, |
85 | 96 |
"name" text NOT NULL, |
... | ... | |
87 | 98 |
PRIMARY KEY ("id"), |
88 | 99 |
/*CONSTRAINT "fk_community_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
89 | 100 |
); |
101 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
90 | 102 |
|
91 | 103 |
-- |
92 | 104 |
-- Dumping data for table "community" |
... | ... | |
99 | 111 |
-- Table structure for table "coordinates" |
100 | 112 |
-- |
101 | 113 |
|
114 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
115 |
/*!40101 SET character_set_client = utf8 */; |
|
102 | 116 |
CREATE TABLE "coordinates" ( |
103 | 117 |
"id" text NOT NULL, |
104 | 118 |
"latitude_deg" text DEFAULT NULL, |
105 | 119 |
"longitude_deg" text DEFAULT NULL, |
106 | 120 |
PRIMARY KEY ("id") |
107 | 121 |
); |
122 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
108 | 123 |
|
109 | 124 |
-- |
110 | 125 |
-- Dumping data for table "coordinates" |
... | ... | |
117 | 132 |
-- Table structure for table "derived_class" |
118 | 133 |
-- |
119 | 134 |
|
135 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
136 |
/*!40101 SET character_set_client = utf8 */; |
|
120 | 137 |
CREATE TABLE "derived_class" ( |
121 | 138 |
"id" text NOT NULL, |
122 | 139 |
PRIMARY KEY ("id"), |
123 | 140 |
/*CONSTRAINT "fk_derived_class_base_class1" FOREIGN KEY ("id") REFERENCES "base_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
124 | 141 |
); |
142 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
125 | 143 |
|
126 | 144 |
-- |
127 | 145 |
-- Dumping data for table "derived_class" |
... | ... | |
134 | 152 |
-- Table structure for table "event" |
135 | 153 |
-- |
136 | 154 |
|
155 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
156 |
/*!40101 SET character_set_client = utf8 */; |
|
137 | 157 |
CREATE TABLE "event" ( |
138 | 158 |
"id" text NOT NULL, |
139 | 159 |
"parent" text NOT NULL, |
... | ... | |
150 | 170 |
/*CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
151 | 171 |
/*CONSTRAINT "fk_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
152 | 172 |
); |
173 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
153 | 174 |
|
154 | 175 |
-- |
155 | 176 |
-- Dumping data for table "event" |
... | ... | |
162 | 183 |
-- Table structure for table "event_participant" |
163 | 184 |
-- |
164 | 185 |
|
186 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
187 |
/*!40101 SET character_set_client = utf8 */; |
|
165 | 188 |
CREATE TABLE "event_participant" ( |
166 | 189 |
"event" text NOT NULL, |
167 | 190 |
"party" text NOT NULL, |
... | ... | |
172 | 195 |
/*CONSTRAINT "fk_event_has_party_event1" FOREIGN KEY ("event") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
173 | 196 |
/*CONSTRAINT "fk_event_has_party_party1" FOREIGN KEY ("party") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
174 | 197 |
); |
198 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
175 | 199 |
|
176 | 200 |
-- |
177 | 201 |
-- Dumping data for table "event_participant" |
... | ... | |
184 | 208 |
-- Table structure for table "geological_context" |
185 | 209 |
-- |
186 | 210 |
|
211 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
212 |
/*!40101 SET character_set_client = utf8 */; |
|
187 | 213 |
CREATE TABLE "geological_context" ( |
188 | 214 |
"id" text NOT NULL, |
189 | 215 |
"name" text NOT NULL, |
... | ... | |
191 | 217 |
PRIMARY KEY ("id"), |
192 | 218 |
/*CONSTRAINT "fk_geological_context_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
193 | 219 |
); |
220 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
194 | 221 |
|
195 | 222 |
-- |
196 | 223 |
-- Dumping data for table "geological_context" |
... | ... | |
203 | 230 |
-- Table structure for table "geovalidation" |
204 | 231 |
-- |
205 | 232 |
|
233 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
234 |
/*!40101 SET character_set_client = utf8 */; |
|
206 | 235 |
CREATE TABLE "geovalidation" ( |
207 | 236 |
"id" text NOT NULL, |
208 | 237 |
"geovalid" integer NOT NULL, |
... | ... | |
211 | 240 |
PRIMARY KEY ("id"), |
212 | 241 |
/*CONSTRAINT "fk_geovalidation_validatable_place1" FOREIGN KEY ("id") REFERENCES "validatable_place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
213 | 242 |
); |
243 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
214 | 244 |
|
215 | 245 |
-- |
216 | 246 |
-- Dumping data for table "geovalidation" |
... | ... | |
223 | 253 |
-- Table structure for table "individual" |
224 | 254 |
-- |
225 | 255 |
|
256 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
257 |
/*!40101 SET character_set_client = utf8 */; |
|
226 | 258 |
CREATE TABLE "individual" ( |
227 | 259 |
"id" text NOT NULL, |
228 | 260 |
"tag" text DEFAULT NULL, |
229 | 261 |
PRIMARY KEY ("id"), |
230 | 262 |
/*CONSTRAINT "fk_individual_record1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
231 | 263 |
); |
264 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
232 | 265 |
|
233 | 266 |
-- |
234 | 267 |
-- Dumping data for table "individual" |
... | ... | |
241 | 274 |
-- Table structure for table "individual_observation" |
242 | 275 |
-- |
243 | 276 |
|
277 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
278 |
/*!40101 SET character_set_client = utf8 */; |
|
244 | 279 |
CREATE TABLE "individual_observation" ( |
245 | 280 |
"id" text NOT NULL, |
246 | 281 |
"individual" text DEFAULT NULL, |
... | ... | |
251 | 286 |
/*CONSTRAINT "fk_individual_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
252 | 287 |
/*CONSTRAINT "fk_individual_observation_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
253 | 288 |
); |
289 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
254 | 290 |
|
255 | 291 |
-- |
256 | 292 |
-- Dumping data for table "individual_observation" |
... | ... | |
263 | 299 |
-- Table structure for table "method" |
264 | 300 |
-- |
265 | 301 |
|
302 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
303 |
/*!40101 SET character_set_client = utf8 */; |
|
266 | 304 |
CREATE TABLE "method" ( |
267 | 305 |
"id" text NOT NULL, |
268 | 306 |
"parent" text NOT NULL, |
... | ... | |
272 | 310 |
/*CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
273 | 311 |
/*CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
274 | 312 |
); |
313 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
275 | 314 |
|
276 | 315 |
-- |
277 | 316 |
-- Dumping data for table "method" |
... | ... | |
284 | 323 |
-- Table structure for table "organization" |
285 | 324 |
-- |
286 | 325 |
|
326 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
327 |
/*!40101 SET character_set_client = utf8 */; |
|
287 | 328 |
CREATE TABLE "organization" ( |
288 | 329 |
"id" text NOT NULL, |
289 | 330 |
"info" hstore DEFAULT NULL, |
290 | 331 |
PRIMARY KEY ("id"), |
291 | 332 |
/*CONSTRAINT "fk_organization_party1" FOREIGN KEY ("id") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
292 | 333 |
); |
334 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
293 | 335 |
|
294 | 336 |
-- |
295 | 337 |
-- Dumping data for table "organization" |
... | ... | |
302 | 344 |
-- Table structure for table "parsed_taxon_assertion" |
303 | 345 |
-- |
304 | 346 |
|
347 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
348 |
/*!40101 SET character_set_client = utf8 */; |
|
305 | 349 |
CREATE TABLE "parsed_taxon_assertion" ( |
306 | 350 |
"id" text NOT NULL, |
307 | 351 |
"matched_taxon_concept" text DEFAULT NULL, |
... | ... | |
312 | 356 |
/*CONSTRAINT "fk_matched_taxon_qualified_taxon10" FOREIGN KEY ("id") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
313 | 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) |
314 | 358 |
); |
359 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
315 | 360 |
|
316 | 361 |
-- |
317 | 362 |
-- Dumping data for table "parsed_taxon_assertion" |
... | ... | |
324 | 369 |
-- Table structure for table "party" |
325 | 370 |
-- |
326 | 371 |
|
372 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
373 |
/*!40101 SET character_set_client = utf8 */; |
|
327 | 374 |
CREATE TABLE "party" ( |
328 | 375 |
"id" text NOT NULL, |
329 | 376 |
"info" hstore DEFAULT NULL, |
330 | 377 |
PRIMARY KEY ("id"), |
331 | 378 |
/*CONSTRAINT "fk_collection_source10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
332 | 379 |
); |
380 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
333 | 381 |
|
334 | 382 |
-- |
335 | 383 |
-- Dumping data for table "party" |
... | ... | |
342 | 390 |
-- Table structure for table "place" |
343 | 391 |
-- |
344 | 392 |
|
393 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
394 |
/*!40101 SET character_set_client = utf8 */; |
|
345 | 395 |
CREATE TABLE "place" ( |
346 | 396 |
"id" text NOT NULL, |
347 | 397 |
"parent" text NOT NULL, |
... | ... | |
357 | 407 |
/*CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
358 | 408 |
/*CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
359 | 409 |
); |
410 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
360 | 411 |
|
361 | 412 |
-- |
362 | 413 |
-- Dumping data for table "place" |
... | ... | |
369 | 420 |
-- Table structure for table "place_observation" |
370 | 421 |
-- |
371 | 422 |
|
423 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
424 |
/*!40101 SET character_set_client = utf8 */; |
|
372 | 425 |
CREATE TABLE "place_observation" ( |
373 | 426 |
"id" text NOT NULL, |
374 | 427 |
"place" text NOT NULL, |
... | ... | |
388 | 441 |
/*CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
389 | 442 |
/*CONSTRAINT "fk_place_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
390 | 443 |
); |
444 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
391 | 445 |
|
392 | 446 |
-- |
393 | 447 |
-- Dumping data for table "place_observation" |
... | ... | |
400 | 454 |
-- Table structure for table "place_path" |
401 | 455 |
-- |
402 | 456 |
|
457 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
458 |
/*!40101 SET character_set_client = utf8 */; |
|
403 | 459 |
CREATE TABLE "place_path" ( |
404 | 460 |
"id" text NOT NULL, |
405 | 461 |
"continent" text DEFAULT NULL, |
... | ... | |
410 | 466 |
"ranks" hstore DEFAULT NULL, |
411 | 467 |
PRIMARY KEY ("id") |
412 | 468 |
); |
469 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
413 | 470 |
|
414 | 471 |
-- |
415 | 472 |
-- Dumping data for table "place_path" |
... | ... | |
422 | 479 |
-- Table structure for table "plot" |
423 | 480 |
-- |
424 | 481 |
|
482 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
483 |
/*!40101 SET character_set_client = utf8 */; |
|
425 | 484 |
CREATE TABLE "plot" ( |
426 | 485 |
"id" text NOT NULL, |
427 | 486 |
"name" text DEFAULT NULL, |
... | ... | |
430 | 489 |
PRIMARY KEY ("id"), |
431 | 490 |
/*CONSTRAINT "fk_subplot_place1" FOREIGN KEY ("id") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
432 | 491 |
); |
492 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
433 | 493 |
|
434 | 494 |
-- |
435 | 495 |
-- Dumping data for table "plot" |
... | ... | |
442 | 502 |
-- Table structure for table "project" |
443 | 503 |
-- |
444 | 504 |
|
505 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
506 |
/*!40101 SET character_set_client = utf8 */; |
|
445 | 507 |
CREATE TABLE "project" ( |
446 | 508 |
"id" text NOT NULL, |
447 | 509 |
"name" text NOT NULL, |
... | ... | |
449 | 511 |
PRIMARY KEY ("id"), |
450 | 512 |
/*CONSTRAINT "fk_project_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
451 | 513 |
); |
514 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
452 | 515 |
|
453 | 516 |
-- |
454 | 517 |
-- Dumping data for table "project" |
... | ... | |
461 | 524 |
-- Table structure for table "record" |
462 | 525 |
-- |
463 | 526 |
|
527 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
528 |
/*!40101 SET character_set_client = utf8 */; |
|
464 | 529 |
CREATE TABLE "record" ( |
465 | 530 |
"id" text NOT NULL, |
466 | 531 |
"source" text NOT NULL, |
... | ... | |
472 | 537 |
/*KEY "fk_record_source1_idx" ("source")*/CHECK (true), |
473 | 538 |
/*CONSTRAINT "fk_record_source1" FOREIGN KEY ("source") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
474 | 539 |
); |
540 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
475 | 541 |
|
476 | 542 |
-- |
477 | 543 |
-- Dumping data for table "record" |
... | ... | |
484 | 550 |
-- Table structure for table "referenced_class" |
485 | 551 |
-- |
486 | 552 |
|
553 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
554 |
/*!40101 SET character_set_client = utf8 */; |
|
487 | 555 |
CREATE TABLE "referenced_class" ( |
488 | 556 |
"id" text NOT NULL, |
489 | 557 |
PRIMARY KEY ("id"), |
490 | 558 |
/*CONSTRAINT "fk_example_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
491 | 559 |
); |
560 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
492 | 561 |
|
493 | 562 |
-- |
494 | 563 |
-- Dumping data for table "referenced_class" |
... | ... | |
501 | 570 |
-- Table structure for table "relationship" |
502 | 571 |
-- |
503 | 572 |
|
573 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
574 |
/*!40101 SET character_set_client = utf8 */; |
|
504 | 575 |
CREATE TABLE "relationship" ( |
505 | 576 |
"id" text NOT NULL, |
506 | 577 |
"record" text NOT NULL, |
... | ... | |
513 | 584 |
/*CONSTRAINT "fk_relationship_record2" FOREIGN KEY ("record") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
514 | 585 |
/*CONSTRAINT "fk_relationship_related_record" FOREIGN KEY ("related_record") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
515 | 586 |
); |
587 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
516 | 588 |
|
517 | 589 |
-- |
518 | 590 |
-- Dumping data for table "relationship" |
... | ... | |
525 | 597 |
-- Table structure for table "soil_observation" |
526 | 598 |
-- |
527 | 599 |
|
600 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
601 |
/*!40101 SET character_set_client = utf8 */; |
|
528 | 602 |
CREATE TABLE "soil_observation" ( |
529 | 603 |
"id" text NOT NULL, |
530 | 604 |
"observations" hstore DEFAULT NULL, |
531 | 605 |
PRIMARY KEY ("id"), |
532 | 606 |
/*CONSTRAINT "fk_soil_observation_place_observation1" FOREIGN KEY ("id") REFERENCES "place_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
533 | 607 |
); |
608 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
534 | 609 |
|
535 | 610 |
-- |
536 | 611 |
-- Dumping data for table "soil_observation" |
... | ... | |
543 | 618 |
-- Table structure for table "source" |
544 | 619 |
-- |
545 | 620 |
|
621 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
622 |
/*!40101 SET character_set_client = utf8 */; |
|
546 | 623 |
CREATE TABLE "source" ( |
547 | 624 |
"id" text NOT NULL, |
548 | 625 |
"parent" text NOT NULL, |
... | ... | |
559 | 636 |
/*CONSTRAINT "fk_source_party1" FOREIGN KEY ("owner") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
560 | 637 |
/*CONSTRAINT "fk_source_party2" FOREIGN KEY ("first_publisher") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
561 | 638 |
); |
639 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
562 | 640 |
|
563 | 641 |
-- |
564 | 642 |
-- Dumping data for table "source" |
... | ... | |
571 | 649 |
-- Table structure for table "specimen" |
572 | 650 |
-- |
573 | 651 |
|
652 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
653 |
/*!40101 SET character_set_client = utf8 */; |
|
574 | 654 |
CREATE TABLE "specimen" ( |
575 | 655 |
"id" text NOT NULL, |
576 | 656 |
"individual" text DEFAULT NULL, |
... | ... | |
598 | 678 |
/*CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
599 | 679 |
/*CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
600 | 680 |
); |
681 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
601 | 682 |
|
602 | 683 |
-- |
603 | 684 |
-- Dumping data for table "specimen" |
... | ... | |
610 | 691 |
-- Table structure for table "specimen_observation" |
611 | 692 |
-- |
612 | 693 |
|
694 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
695 |
/*!40101 SET character_set_client = utf8 */; |
|
613 | 696 |
CREATE TABLE "specimen_observation" ( |
614 | 697 |
"id" text NOT NULL, |
615 | 698 |
"specimen" text NOT NULL, |
... | ... | |
619 | 702 |
/*CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
620 | 703 |
/*CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
621 | 704 |
); |
705 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
622 | 706 |
|
623 | 707 |
-- |
624 | 708 |
-- Dumping data for table "specimen_observation" |
... | ... | |
631 | 715 |
-- Table structure for table "specimenholder_institution" |
632 | 716 |
-- |
633 | 717 |
|
718 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
719 |
/*!40101 SET character_set_client = utf8 */; |
|
634 | 720 |
CREATE TABLE "specimenholder_institution" ( |
635 | 721 |
"specimen" text NOT NULL, |
636 | 722 |
"institution" text NOT NULL, |
... | ... | |
641 | 727 |
/*CONSTRAINT "fk_specimen_has_organization_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
642 | 728 |
/*CONSTRAINT "fk_specimen_has_organization_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
643 | 729 |
); |
730 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
644 | 731 |
|
645 | 732 |
-- |
646 | 733 |
-- Dumping data for table "specimenholder_institution" |
... | ... | |
653 | 740 |
-- Table structure for table "stem" |
654 | 741 |
-- |
655 | 742 |
|
743 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
744 |
/*!40101 SET character_set_client = utf8 */; |
|
656 | 745 |
CREATE TABLE "stem" ( |
657 | 746 |
"id" text NOT NULL, |
658 | 747 |
"individual" text NOT NULL, |
... | ... | |
661 | 750 |
/*CONSTRAINT "fk_stem_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
662 | 751 |
/*CONSTRAINT "fk_stem_individual2" FOREIGN KEY ("id") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
663 | 752 |
); |
753 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
664 | 754 |
|
665 | 755 |
-- |
666 | 756 |
-- Dumping data for table "stem" |
... | ... | |
673 | 763 |
-- Table structure for table "stem_observation" |
674 | 764 |
-- |
675 | 765 |
|
766 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
767 |
/*!40101 SET character_set_client = utf8 */; |
|
676 | 768 |
CREATE TABLE "stem_observation" ( |
677 | 769 |
"id" text NOT NULL, |
678 | 770 |
"individual_observation" text NOT NULL, |
... | ... | |
686 | 778 |
/*CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
687 | 779 |
/*CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
688 | 780 |
); |
781 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
689 | 782 |
|
690 | 783 |
-- |
691 | 784 |
-- Dumping data for table "stem_observation" |
... | ... | |
698 | 791 |
-- Table structure for table "stratum" |
699 | 792 |
-- |
700 | 793 |
|
794 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
795 |
/*!40101 SET character_set_client = utf8 */; |
|
701 | 796 |
CREATE TABLE "stratum" ( |
702 | 797 |
"id" text NOT NULL, |
703 | 798 |
"name" text NOT NULL, |
... | ... | |
705 | 800 |
PRIMARY KEY ("id"), |
706 | 801 |
/*CONSTRAINT "fk_place_path_record10" FOREIGN KEY ("id") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
707 | 802 |
); |
803 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
708 | 804 |
|
709 | 805 |
-- |
710 | 806 |
-- Dumping data for table "stratum" |
... | ... | |
717 | 813 |
-- Table structure for table "subplot" |
718 | 814 |
-- |
719 | 815 |
|
816 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
817 |
/*!40101 SET character_set_client = utf8 */; |
|
720 | 818 |
CREATE TABLE "subplot" ( |
721 | 819 |
"id" text NOT NULL, |
722 | 820 |
"x_m" double precision DEFAULT NULL, |
... | ... | |
724 | 822 |
PRIMARY KEY ("id"), |
725 | 823 |
/*CONSTRAINT "fk_subplot_plot1" FOREIGN KEY ("id") REFERENCES "plot" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
726 | 824 |
); |
825 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
727 | 826 |
|
728 | 827 |
-- |
729 | 828 |
-- Dumping data for table "subplot" |
... | ... | |
736 | 835 |
-- Table structure for table "taxon_assertion" |
737 | 836 |
-- |
738 | 837 |
|
838 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
839 |
/*!40101 SET character_set_client = utf8 */; |
|
739 | 840 |
CREATE TABLE "taxon_assertion" ( |
740 | 841 |
"id" text NOT NULL, |
741 | 842 |
"string" text NOT NULL, |
... | ... | |
749 | 850 |
/*CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
750 | 851 |
/*CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
751 | 852 |
); |
853 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
752 | 854 |
|
753 | 855 |
-- |
754 | 856 |
-- Dumping data for table "taxon_assertion" |
... | ... | |
761 | 863 |
-- Table structure for table "taxon_concept" |
762 | 864 |
-- |
763 | 865 |
|
866 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
867 |
/*!40101 SET character_set_client = utf8 */; |
|
764 | 868 |
CREATE TABLE "taxon_concept" ( |
765 | 869 |
"id" text NOT NULL, |
766 | 870 |
"according_to" text NOT NULL, |
... | ... | |
776 | 880 |
/*CONSTRAINT "fk_taxon_concept_taxon_concept1" FOREIGN KEY ("accepted_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
777 | 881 |
/*CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
778 | 882 |
); |
883 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
779 | 884 |
|
780 | 885 |
-- |
781 | 886 |
-- Dumping data for table "taxon_concept" |
... | ... | |
788 | 893 |
-- Table structure for table "taxon_determination" |
789 | 894 |
-- |
790 | 895 |
|
896 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
897 |
/*!40101 SET character_set_client = utf8 */; |
|
791 | 898 |
CREATE TABLE "taxon_determination" ( |
792 | 899 |
"id" text NOT NULL, |
793 | 900 |
"taxon_assertion" text NOT NULL, |
... | ... | |
801 | 908 |
/*CONSTRAINT "fk_taxon_determination_record1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
802 | 909 |
/*CONSTRAINT "fk_taxon_determination_party1" FOREIGN KEY ("identified_by") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
803 | 910 |
); |
911 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
804 | 912 |
|
805 | 913 |
-- |
806 | 914 |
-- Dumping data for table "taxon_determination" |
... | ... | |
813 | 921 |
-- Table structure for table "taxon_name" |
814 | 922 |
-- |
815 | 923 |
|
924 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
925 |
/*!40101 SET character_set_client = utf8 */; |
|
816 | 926 |
CREATE TABLE "taxon_name" ( |
817 | 927 |
"id" text NOT NULL, |
818 | 928 |
"unique_name" text NOT NULL, |
... | ... | |
826 | 936 |
/*CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
827 | 937 |
/*CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
828 | 938 |
); |
939 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
829 | 940 |
|
830 | 941 |
-- |
831 | 942 |
-- Dumping data for table "taxon_name" |
... | ... | |
838 | 949 |
-- Table structure for table "taxon_observation" |
839 | 950 |
-- |
840 | 951 |
|
952 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
953 |
/*!40101 SET character_set_client = utf8 */; |
|
841 | 954 |
CREATE TABLE "taxon_observation" ( |
842 | 955 |
"id" text NOT NULL, |
843 | 956 |
"taxon_occurrence" text NOT NULL, |
... | ... | |
856 | 969 |
/*CONSTRAINT "fk_taxon_observation_specimen1" FOREIGN KEY ("voucher") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
857 | 970 |
/*CONSTRAINT "fk_taxon_observation_party1" FOREIGN KEY ("collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
858 | 971 |
); |
972 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
859 | 973 |
|
860 | 974 |
-- |
861 | 975 |
-- Dumping data for table "taxon_observation" |
... | ... | |
868 | 982 |
-- Table structure for table "taxon_occurrence" |
869 | 983 |
-- |
870 | 984 |
|
985 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
986 |
/*!40101 SET character_set_client = utf8 */; |
|
871 | 987 |
CREATE TABLE "taxon_occurrence" ( |
872 | 988 |
"id" text NOT NULL, |
873 | 989 |
"current_determination" text DEFAULT NULL, |
... | ... | |
879 | 995 |
/*CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
880 | 996 |
/*CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
881 | 997 |
); |
998 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
882 | 999 |
|
883 | 1000 |
-- |
884 | 1001 |
-- Dumping data for table "taxon_occurrence" |
... | ... | |
891 | 1008 |
-- Table structure for table "taxon_path" |
892 | 1009 |
-- |
893 | 1010 |
|
1011 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
1012 |
/*!40101 SET character_set_client = utf8 */; |
|
894 | 1013 |
CREATE TABLE "taxon_path" ( |
895 | 1014 |
"id" text NOT NULL, |
896 | 1015 |
"family" text DEFAULT NULL, |
... | ... | |
900 | 1019 |
PRIMARY KEY ("id"), |
901 | 1020 |
/*CONSTRAINT "fk_taxon_path_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
902 | 1021 |
); |
1022 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
903 | 1023 |
|
904 | 1024 |
-- |
905 | 1025 |
-- Dumping data for table "taxon_path" |
... | ... | |
912 | 1032 |
-- Table structure for table "taxon_presence" |
913 | 1033 |
-- |
914 | 1034 |
|
1035 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
1036 |
/*!40101 SET character_set_client = utf8 */; |
|
915 | 1037 |
CREATE TABLE "taxon_presence" ( |
916 | 1038 |
"id" text NOT NULL, |
917 | 1039 |
"taxon_concept" text NOT NULL, |
... | ... | |
921 | 1043 |
/*CONSTRAINT "fk_taxon_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
922 | 1044 |
/*CONSTRAINT "fk_taxon_presence_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
923 | 1045 |
); |
1046 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
924 | 1047 |
|
925 | 1048 |
-- |
926 | 1049 |
-- Dumping data for table "taxon_presence" |
... | ... | |
933 | 1056 |
-- Table structure for table "taxon_string" |
934 | 1057 |
-- |
935 | 1058 |
|
1059 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
1060 |
/*!40101 SET character_set_client = utf8 */; |
|
936 | 1061 |
CREATE TABLE "taxon_string" ( |
937 | 1062 |
"string" text NOT NULL, |
938 | 1063 |
"parsed_taxon_assertion" text DEFAULT NULL, |
... | ... | |
940 | 1065 |
/*KEY "fk_taxon_string_parsed_taxon_assertion1_idx" ("parsed_taxon_assertion")*/CHECK (true), |
941 | 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) |
942 | 1067 |
); |
1068 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
943 | 1069 |
|
944 | 1070 |
-- |
945 | 1071 |
-- Dumping data for table "taxon_string" |
... | ... | |
952 | 1078 |
-- Table structure for table "validatable_place" |
953 | 1079 |
-- |
954 | 1080 |
|
1081 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
1082 |
/*!40101 SET character_set_client = utf8 */; |
|
955 | 1083 |
CREATE TABLE "validatable_place" ( |
956 | 1084 |
"id" text NOT NULL, |
957 | 1085 |
"coordinates" text NOT NULL, |
... | ... | |
963 | 1091 |
/*CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
964 | 1092 |
/*CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
965 | 1093 |
); |
1094 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
966 | 1095 |
|
967 | 1096 |
-- |
968 | 1097 |
-- Dumping data for table "validatable_place" |
lib/sh/local.sh | ||
---|---|---|
17 | 17 |
|
18 | 18 |
#### connection vars |
19 | 19 |
|
20 |
: "${remote_server=vegbiendev.nceas.ucsb.edu}" |
|
20 |
: "${remote_ssh_server=vegbiendev.nceas.ucsb.edu}" |
|
21 |
: "${remote_server=}" |
|
21 | 22 |
: "${local_server=localhost}" |
22 | 23 |
: "${local_user=bien}" |
23 | 24 |
: "${local_password="$(cat "$root_dir"/config/bien_password)"}" |
Also available in: Unified diff
lib/sh/local.sh: database connection vars: connect to vegbiendev via ssh and run commands locally, to allow running commands as root (which can only connect to the database locally). this effectively requires an ssh account on vegbiendev, but any ssh account (including an anonymous one, if we set one up) will do. this causes schemas/VegCore/VegCore.my.sql, VegCore.pg.sql to change, because they are now created by mysqldump running on vegbiendev (Linux) instead of on a Mac.