Revision 10469
Added by Aaron Marcuse-Kubitza almost 11 years ago
VegCore.pg.sql | ||
---|---|---|
74 | 74 |
/*CONSTRAINT "collection_unique" */UNIQUE ("institution","name"), |
75 | 75 |
/*KEY "fk_collection_organization1_idx" ("institution")*/CHECK (true), |
76 | 76 |
/*KEY "fk_collection_source1_idx" ("id")*/CHECK (true), |
77 |
/*CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
78 |
/*CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("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 |
/*CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
79 | 79 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"the collection within the institution where a specimen is held" ("Brad Boyle":https://projects.nceas.ucsb.edu/nceas/attachments/download/621/vegbien_identifier_examples.xlsx#terms/collectionCode)'*/; |
80 | 80 |
/*!40101 SET character_set_client = @saved_cs_client */; |
81 | 81 |
|
... | ... | |
145 | 145 |
/*KEY "fk_event_place1_idx" ("place")*/CHECK (true), |
146 | 146 |
/*KEY "fk_event1_idx" ("parent")*/CHECK (true), |
147 | 147 |
/*KEY "fk_event_party_list1_idx" ("participants")*/CHECK (true), |
148 |
/*CONSTRAINT "fk_event_party_list1" FOREIGN KEY ("participants") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
148 | 149 |
/*CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
149 |
/*CONSTRAINT "fk_event_party_list1" FOREIGN KEY ("participants") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
150 | 150 |
/*CONSTRAINT "fk_event_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
151 | 151 |
/*CONSTRAINT "fk_event_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
152 | 152 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"an action that occurs at a place and during a period of text/*time*/" ("DwC":http://rs.tdwg.org/dwc/terms/#Event)'*/; |
... | ... | |
228 | 228 |
/*!40000 ALTER TABLE "geopath" ENABLE KEYS */; |
229 | 229 |
|
230 | 230 |
-- |
231 |
-- Table structure for table "geovalidatable_place"
|
|
231 |
-- Table structure for table "geoplace" |
|
232 | 232 |
-- |
233 | 233 |
|
234 | 234 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
235 | 235 |
/*!40101 SET character_set_client = utf8 */; |
236 |
CREATE TABLE "geovalidatable_place" (
|
|
236 |
CREATE TABLE "geoplace" ( |
|
237 | 237 |
"id" text NOT NULL, |
238 | 238 |
"geocoordinates" text NOT NULL, |
239 | 239 |
"geopath" text NOT NULL, |
... | ... | |
241 | 241 |
/*CONSTRAINT "validatable_place_unique" */UNIQUE ("geopath","geocoordinates"), |
242 | 242 |
/*KEY "fk_geovalidation_place_path1_idx" ("geopath")*/CHECK (true), |
243 | 243 |
/*KEY "fk_geovalidation_coordinates1_idx" ("geocoordinates")*/CHECK (true), |
244 |
/*CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("geocoordinates") REFERENCES "geocoordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
245 |
/*CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("geopath") REFERENCES "geopath" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
244 |
/*CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("geopath") REFERENCES "geopath" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
245 |
/*CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("geocoordinates") REFERENCES "geocoordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
246 | 246 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/; |
247 | 247 |
/*!40101 SET character_set_client = @saved_cs_client */; |
248 | 248 |
|
249 | 249 |
-- |
250 |
-- Dumping data for table "geovalidatable_place"
|
|
250 |
-- Dumping data for table "geoplace" |
|
251 | 251 |
-- |
252 | 252 |
|
253 |
/*!40000 ALTER TABLE "geovalidatable_place" DISABLE KEYS */;
|
|
254 |
/*!40000 ALTER TABLE "geovalidatable_place" ENABLE KEYS */;
|
|
253 |
/*!40000 ALTER TABLE "geoplace" DISABLE KEYS */; |
|
254 |
/*!40000 ALTER TABLE "geoplace" ENABLE KEYS */; |
|
255 | 255 |
|
256 | 256 |
-- |
257 | 257 |
-- Table structure for table "geovalidation" |
... | ... | |
265 | 265 |
"lat_long_domain_valid" integer NOT NULL, |
266 | 266 |
"lat_long_in_place_ranks" hstore DEFAULT NULL, |
267 | 267 |
PRIMARY KEY ("id"), |
268 |
/*CONSTRAINT "fk_geovalidation_validatable_place1" FOREIGN KEY ("id") REFERENCES "geovalidatable_place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
268 |
/*CONSTRAINT "fk_geovalidation_validatable_place1" FOREIGN KEY ("id") REFERENCES "geoplace" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
269 | 269 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='The accuracy of the [[VegCore#Coordinates|Coordinates]], taking into account the [[VegCore#Placename|Placename]]'*/; |
270 | 270 |
/*!40101 SET character_set_client = @saved_cs_client */; |
271 | 271 |
|
... | ... | |
335 | 335 |
"info" hstore DEFAULT NULL, |
336 | 336 |
PRIMARY KEY ("id"), |
337 | 337 |
/*KEY "fk_method_method1_idx" ("parent")*/CHECK (true), |
338 |
/*CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
339 |
/*CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
338 |
/*CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
339 |
/*CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
340 | 340 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A specific method definition followed in the creation of the dataset. Each method links to a protocol and literature citation reference. A protocol may have many method or steps." ("VegX":http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/methods/method)'*/; |
341 | 341 |
/*!40101 SET character_set_client = @saved_cs_client */; |
342 | 342 |
|
... | ... | |
369 | 369 |
/*!40000 ALTER TABLE "organization" ENABLE KEYS */; |
370 | 370 |
|
371 | 371 |
-- |
372 |
-- Table structure for table "parsed_taxon_assertion" |
|
373 |
-- |
|
374 |
|
|
375 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
376 |
/*!40101 SET character_set_client = utf8 */; |
|
377 |
CREATE TABLE "parsed_taxon_assertion" ( |
|
378 |
"id" text NOT NULL, |
|
379 |
"matched_taxon_concept" text DEFAULT NULL, |
|
380 |
"match_score" float DEFAULT NULL, |
|
381 |
"match_info" hstore DEFAULT NULL, |
|
382 |
PRIMARY KEY ("id"), |
|
383 |
/*KEY "fk_parsed_taxon_assertion_taxon_name1_idx" ("matched_taxon_concept")*/CHECK (true), |
|
384 |
/*CONSTRAINT "fk_matched_taxon_qualified_taxon10" FOREIGN KEY ("id") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
385 |
/*CONSTRAINT "fk_parsed_taxon_assertion_taxon_name1" FOREIGN KEY ("matched_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
386 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/; |
|
387 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
388 |
|
|
389 |
-- |
|
390 |
-- Dumping data for table "parsed_taxon_assertion" |
|
391 |
-- |
|
392 |
|
|
393 |
/*!40000 ALTER TABLE "parsed_taxon_assertion" DISABLE KEYS */; |
|
394 |
/*!40000 ALTER TABLE "parsed_taxon_assertion" ENABLE KEYS */; |
|
395 |
|
|
396 |
-- |
|
397 | 372 |
-- Table structure for table "party" |
398 | 373 |
-- |
399 | 374 |
|
... | ... | |
405 | 380 |
"info" hstore DEFAULT NULL, |
406 | 381 |
PRIMARY KEY ("id"), |
407 | 382 |
/*KEY "fk_party_organization1_idx" ("organization")*/CHECK (true), |
408 |
/*CONSTRAINT "fk_collection_source10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
409 |
/*CONSTRAINT "fk_party_organization1" FOREIGN KEY ("organization") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
383 |
/*CONSTRAINT "fk_party_organization1" FOREIGN KEY ("organization") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
384 |
/*CONSTRAINT "fk_collection_source10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
410 | 385 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/; |
411 | 386 |
/*!40101 SET character_set_client = @saved_cs_client */; |
412 | 387 |
|
... | ... | |
451 | 426 |
PRIMARY KEY ("id","entry"), |
452 | 427 |
/*KEY "fk_party_list_has_party_party1_idx" ("entry")*/CHECK (true), |
453 | 428 |
/*KEY "fk_party_list_has_party_party_list1_idx" ("id")*/CHECK (true), |
454 |
/*CONSTRAINT "fk_party_list_has_party_party1" FOREIGN KEY ("entry") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
455 |
/*CONSTRAINT "fk_party_list_has_party_party_list1" FOREIGN KEY ("id") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
429 |
/*CONSTRAINT "fk_party_list_has_party_party_list1" FOREIGN KEY ("id") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
430 |
/*CONSTRAINT "fk_party_list_has_party_party1" FOREIGN KEY ("entry") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
456 | 431 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/; |
457 | 432 |
/*!40101 SET character_set_client = @saved_cs_client */; |
458 | 433 |
|
... | ... | |
479 | 454 |
/*KEY "fk_place_coordinates1_idx" ("geocoordinates")*/CHECK (true), |
480 | 455 |
/*KEY "fk_place1_idx" ("parent")*/CHECK (true), |
481 | 456 |
/*KEY "fk_place_place_path1_idx" ("geopath")*/CHECK (true), |
457 |
/*CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
458 |
/*CONSTRAINT "fk_place_coordinates1" FOREIGN KEY ("geocoordinates") REFERENCES "geocoordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
482 | 459 |
/*CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
483 |
/*CONSTRAINT "fk_place_coordinates1" FOREIGN KEY ("geocoordinates") REFERENCES "geocoordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
484 |
/*CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("geopath") REFERENCES "geopath" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
485 |
/*CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
460 |
/*CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("geopath") REFERENCES "geopath" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
486 | 461 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A spatial region" ("DwC":http://rs.tdwg.org/dwc/terms/#dcterms:Location) or point'*/; |
487 | 462 |
/*!40101 SET character_set_client = @saved_cs_client */; |
488 | 463 |
|
... | ... | |
512 | 487 |
/*KEY "fk_place_observation_place1_idx" ("place")*/CHECK (true), |
513 | 488 |
/*KEY "fk_place_observation_geological_context1_idx" ("geological_context")*/CHECK (true), |
514 | 489 |
/*KEY "fk_place_observation_community1_idx" ("community")*/CHECK (true), |
490 |
/*CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
491 |
/*CONSTRAINT "fk_place_observation_geological_context1" FOREIGN KEY ("geological_context") REFERENCES "geological_context" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
515 | 492 |
/*CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
516 |
/*CONSTRAINT "fk_place_observation_geological_context1" FOREIGN KEY ("geological_context") REFERENCES "geological_context" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
517 |
/*CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
518 | 493 |
/*CONSTRAINT "fk_place_observation_sampling_event1" FOREIGN KEY ("id") REFERENCES "sampling_event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
519 | 494 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]'*/; |
520 | 495 |
/*!40101 SET character_set_client = @saved_cs_client */; |
... | ... | |
658 | 633 |
"method" text DEFAULT NULL, |
659 | 634 |
PRIMARY KEY ("id"), |
660 | 635 |
/*KEY "fk_sampling_event_method1_idx" ("method")*/CHECK (true), |
661 |
/*CONSTRAINT "fk_project_event10" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
662 |
/*CONSTRAINT "fk_sampling_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
636 |
/*CONSTRAINT "fk_sampling_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
637 |
/*CONSTRAINT "fk_project_event10" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
663 | 638 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/; |
664 | 639 |
/*!40101 SET character_set_client = @saved_cs_client */; |
665 | 640 |
|
... | ... | |
750 | 725 |
/*KEY "fk_specimen_collection2_idx" ("current_collection")*/CHECK (true), |
751 | 726 |
/*KEY "fk_specimen_organization3_idx" ("owner_collection")*/CHECK (true), |
752 | 727 |
/*KEY "fk_specimen_party_list1_idx" ("specimenholder_institutions")*/CHECK (true), |
753 |
/*CONSTRAINT "fk_specimen_collection1" FOREIGN KEY ("orig_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
728 |
/*CONSTRAINT "fk_specimen_organization3" FOREIGN KEY ("owner_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
729 |
/*CONSTRAINT "fk_specimen_taxon_observation1" FOREIGN KEY ("collection_event") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
730 |
/*CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
754 | 731 |
/*CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
755 |
/*CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
756 |
/*CONSTRAINT "fk_specimen_organization3" FOREIGN KEY ("owner_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
757 | 732 |
/*CONSTRAINT "fk_specimen_party_list1" FOREIGN KEY ("specimenholder_institutions") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
758 |
/*CONSTRAINT "fk_specimen_taxon_observation1" FOREIGN KEY ("collection_event") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
733 |
/*CONSTRAINT "fk_specimen_collection1" FOREIGN KEY ("orig_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
759 | 734 |
/*CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
760 | 735 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A "part of a plant" ("Wikipedia":http://en.wikipedia.org/wiki/Specimen) which was collected from it'*/; |
761 | 736 |
/*!40101 SET character_set_client = @saved_cs_client */; |
... | ... | |
779 | 754 |
"traits" hstore DEFAULT NULL, |
780 | 755 |
PRIMARY KEY ("id"), |
781 | 756 |
/*KEY "fk_specimen_observation_specimen1_idx" ("specimen")*/CHECK (true), |
782 |
/*CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
783 |
/*CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
757 |
/*CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
758 |
/*CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
784 | 759 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/; |
785 | 760 |
/*!40101 SET character_set_client = @saved_cs_client */; |
786 | 761 |
|
... | ... | |
829 | 804 |
/*CONSTRAINT "stem_observation_unique" */UNIQUE ("individual_observation","stem"), |
830 | 805 |
/*KEY "fk_stem_observation_individual_observation1_idx" ("individual_observation")*/CHECK (true), |
831 | 806 |
/*KEY "fk_stem_observation_stem1_idx" ("stem")*/CHECK (true), |
807 |
/*CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
832 | 808 |
/*CONSTRAINT "fk_stem_observation_individual_observation1" FOREIGN KEY ("individual_observation") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
833 |
/*CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
834 |
/*CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
809 |
/*CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
835 | 810 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of a [[VegCore#Stem|Stem]]'*/; |
836 | 811 |
/*!40101 SET character_set_client = @saved_cs_client */; |
837 | 812 |
|
... | ... | |
926 | 901 |
/*KEY "fk_taxon_assertion_taxon_string1_idx" ("string")*/CHECK (true), |
927 | 902 |
/*KEY "fk_taxon_assertion_taxon_name1_idx" ("taxon")*/CHECK (true), |
928 | 903 |
/*CONSTRAINT "fk_qualified_taxon_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
929 |
/*CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
930 |
/*CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
904 |
/*CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
905 |
/*CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
931 | 906 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/; |
932 | 907 |
/*!40101 SET character_set_client = @saved_cs_client */; |
933 | 908 |
|
... | ... | |
954 | 929 |
/*KEY "fk_taxon_taxon1_idx" ("parent")*/CHECK (true), |
955 | 930 |
/*KEY "fk_taxon_concept_source1_idx" ("according_to")*/CHECK (true), |
956 | 931 |
/*KEY "fk_taxon_concept_taxon_concept1_idx" ("accepted_taxon_concept")*/CHECK (true), |
932 |
/*CONSTRAINT "fk_taxon_taxon1" FOREIGN KEY ("parent") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
957 | 933 |
/*CONSTRAINT "fk_taxon_concept_source1" FOREIGN KEY ("according_to") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
958 | 934 |
/*CONSTRAINT "fk_taxon_concept_taxon_concept1" FOREIGN KEY ("accepted_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
959 |
/*CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
960 |
/*CONSTRAINT "fk_taxon_taxon1" FOREIGN KEY ("parent") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
935 |
/*CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
961 | 936 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A [[VegCore#Taxon|Taxon]] described by a specific [[VegCore#Reference|Reference]]'*/; |
962 | 937 |
/*!40101 SET character_set_client = @saved_cs_client */; |
963 | 938 |
|
... | ... | |
983 | 958 |
/*CONSTRAINT "taxon_determination_unique" */UNIQUE ("taxon_assertion","identified_by"), |
984 | 959 |
/*KEY "fk_taxon_occurrence_has_qualified_taxon1_idx" ("taxon_assertion")*/CHECK (true), |
985 | 960 |
/*KEY "fk_taxon_determination_party_list1_idx" ("identified_by")*/CHECK (true), |
986 |
/*CONSTRAINT "fk_taxon_determination_party_list1" FOREIGN KEY ("identified_by") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
961 |
/*CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
987 | 962 |
/*CONSTRAINT "fk_taxon_determination_record1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
988 |
/*CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
963 |
/*CONSTRAINT "fk_taxon_determination_party_list1" FOREIGN KEY ("identified_by") REFERENCES "party_list" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
989 | 964 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An assertion that a [[VegCore#TaxonOccurrence|TaxonOccurrence]] is a particular [[VegCore#Taxon|Taxon]]'*/; |
990 | 965 |
/*!40101 SET character_set_client = @saved_cs_client */; |
991 | 966 |
|
... | ... | |
1012 | 987 |
"rank" text DEFAULT NULL, |
1013 | 988 |
PRIMARY KEY ("id"), |
1014 | 989 |
/*KEY "fk_taxon_concept_taxon_string10_idx" ("unique_name")*/CHECK (true), |
1015 |
/*CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
1016 |
/*CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
990 |
/*CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
991 |
/*CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
1017 | 992 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/; |
1018 | 993 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1019 | 994 |
|
... | ... | |
1070 | 1045 |
PRIMARY KEY ("id"), |
1071 | 1046 |
/*KEY "fk_taxon_occurrence_taxon_determination1_idx" ("original_determination")*/CHECK (true), |
1072 | 1047 |
/*KEY "fk_taxon_occurrence_taxon_determination2_idx" ("current_determination")*/CHECK (true), |
1073 |
/*CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
1074 | 1048 |
/*CONSTRAINT "fk_taxon_occurrence_taxon_determination1" FOREIGN KEY ("original_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
1075 |
/*CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
1049 |
/*CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
1050 |
/*CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
1076 | 1051 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Any entity on which [[VegCore#TaxonDetermination|TaxonDetermination]]s can be made'*/; |
1077 | 1052 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1078 | 1053 |
|
... | ... | |
1132 | 1107 |
/*!40000 ALTER TABLE "taxon_presence" ENABLE KEYS */; |
1133 | 1108 |
|
1134 | 1109 |
-- |
1110 |
-- Table structure for table "taxon_scrub" |
|
1111 |
-- |
|
1112 |
|
|
1113 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
1114 |
/*!40101 SET character_set_client = utf8 */; |
|
1115 |
CREATE TABLE "taxon_scrub" ( |
|
1116 |
"id" text NOT NULL, |
|
1117 |
"input_string" text NOT NULL, |
|
1118 |
"parsed_taxon_assertion" text NOT NULL, |
|
1119 |
"matched_taxon_concept" text DEFAULT NULL, |
|
1120 |
"match_score" float DEFAULT NULL, |
|
1121 |
"match_info" hstore DEFAULT NULL, |
|
1122 |
PRIMARY KEY ("id"), |
|
1123 |
/*KEY "fk_parsed_taxon_assertion_taxon_name1_idx" ("matched_taxon_concept")*/CHECK (true), |
|
1124 |
/*KEY "fk_taxon_scrub_taxon_assertion1_idx" ("parsed_taxon_assertion")*/CHECK (true), |
|
1125 |
/*KEY "fk_taxon_scrub_taxon_string1_idx" ("input_string")*/CHECK (true), |
|
1126 |
/*CONSTRAINT "fk_parsed_taxon_assertion_taxon_name1" FOREIGN KEY ("matched_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
1127 |
/*CONSTRAINT "fk_taxon_scrub_taxon_assertion1" FOREIGN KEY ("parsed_taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
1128 |
/*CONSTRAINT "fk_taxon_scrub_taxon_string1" FOREIGN KEY ("input_string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
1129 |
/*CONSTRAINT "fk_taxon_scrub_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
1130 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/; |
|
1131 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
1132 |
|
|
1133 |
-- |
|
1134 |
-- Dumping data for table "taxon_scrub" |
|
1135 |
-- |
|
1136 |
|
|
1137 |
/*!40000 ALTER TABLE "taxon_scrub" DISABLE KEYS */; |
|
1138 |
/*!40000 ALTER TABLE "taxon_scrub" ENABLE KEYS */; |
|
1139 |
|
|
1140 |
-- |
|
1135 | 1141 |
-- Table structure for table "taxon_string" |
1136 | 1142 |
-- |
1137 | 1143 |
|
Also available in: Unified diff
schemas/VegCore/VegCore.ERD.mwb: replaced parsed_taxon_assertion with taxon_scrub, which HAS-A parsed taxon_assertion rather than BEING-A parsed_taxon_assertion. (multiple TNRS results may parse to the same thing.)