Revision 9852
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/VegCore/VegCore.my.sql | ||
---|---|---|
2 | 2 |
-- |
3 | 3 |
-- Host: localhost Database: VegCore |
4 | 4 |
-- ------------------------------------------------------ |
5 |
-- Server version 5.5.31-0ubuntu0.12.04.1
|
|
5 |
-- Server version 5.5.31-0ubuntu0.12.04.2
|
|
6 | 6 |
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; |
7 | 7 |
/*!40103 SET TIME_ZONE='+00:00' */; |
8 | 8 |
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; |
... | ... | |
22 | 22 |
"traits" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
23 | 23 |
PRIMARY KEY ("id"), |
24 | 24 |
KEY "fk_aggregate_observation_taxon_name1_idx" ("taxon_concept"), |
25 |
CONSTRAINT "fk_aggregate_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
26 |
CONSTRAINT "fk_aggregate_observation_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
25 |
CONSTRAINT "fk_aggregate_observation_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
26 |
CONSTRAINT "fk_aggregate_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
27 | 27 |
); |
28 | 28 |
/*!40101 SET character_set_client = @saved_cs_client */; |
29 | 29 |
|
... | ... | |
45 | 45 |
"referenced_class" varbinary(767) NOT NULL, |
46 | 46 |
PRIMARY KEY ("id"), |
47 | 47 |
KEY "fk_base_class_referenced_class1_idx" ("referenced_class"), |
48 |
CONSTRAINT "fk_example_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
49 |
CONSTRAINT "fk_base_class_referenced_class1" FOREIGN KEY ("referenced_class") REFERENCES "referenced_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
48 |
CONSTRAINT "fk_base_class_referenced_class1" FOREIGN KEY ("referenced_class") REFERENCES "referenced_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
49 |
CONSTRAINT "fk_example_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
50 | 50 |
); |
51 | 51 |
/*!40101 SET character_set_client = @saved_cs_client */; |
52 | 52 |
|
... | ... | |
71 | 71 |
UNIQUE KEY "collection_unique" ("institution","name"), |
72 | 72 |
KEY "fk_collection_organization1_idx" ("institution"), |
73 | 73 |
KEY "fk_collection_source1_idx" ("id"), |
74 |
CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
75 |
CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
74 |
CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
75 |
CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
76 | 76 |
); |
77 | 77 |
/*!40101 SET character_set_client = @saved_cs_client */; |
78 | 78 |
|
... | ... | |
163 | 163 |
KEY "fk_event_place1_idx" ("place"), |
164 | 164 |
KEY "fk_event1_idx" ("parent"), |
165 | 165 |
KEY "fk_event_method1_idx" ("method"), |
166 |
CONSTRAINT "fk_event_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
166 |
CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
167 |
CONSTRAINT "fk_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
167 | 168 |
CONSTRAINT "fk_event_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
168 |
CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
169 |
CONSTRAINT "fk_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
169 |
CONSTRAINT "fk_event_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
170 | 170 |
); |
171 | 171 |
/*!40101 SET character_set_client = @saved_cs_client */; |
172 | 172 |
|
... | ... | |
281 | 281 |
"traits" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
282 | 282 |
PRIMARY KEY ("id"), |
283 | 283 |
KEY "fk_individual_observation_individual1_idx" ("individual"), |
284 |
CONSTRAINT "fk_individual_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
285 |
CONSTRAINT "fk_individual_observation_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
284 |
CONSTRAINT "fk_individual_observation_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
285 |
CONSTRAINT "fk_individual_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
286 | 286 |
); |
287 | 287 |
/*!40101 SET character_set_client = @saved_cs_client */; |
288 | 288 |
|
... | ... | |
305 | 305 |
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
306 | 306 |
PRIMARY KEY ("id"), |
307 | 307 |
KEY "fk_method_method1_idx" ("parent"), |
308 |
CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
309 |
CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
308 |
CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
309 |
CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
310 | 310 |
); |
311 | 311 |
/*!40101 SET character_set_client = @saved_cs_client */; |
312 | 312 |
|
... | ... | |
400 | 400 |
KEY "fk_place_coordinates1_idx" ("coordinates"), |
401 | 401 |
KEY "fk_place1_idx" ("parent"), |
402 | 402 |
KEY "fk_place_place_path1_idx" ("path"), |
403 |
CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
403 |
CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
404 | 404 |
CONSTRAINT "fk_place_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
405 |
CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
406 |
CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
405 |
CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
406 |
CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
407 | 407 |
); |
408 | 408 |
/*!40101 SET character_set_client = @saved_cs_client */; |
409 | 409 |
|
... | ... | |
434 | 434 |
KEY "fk_place_observation_geological_context1_idx" ("geological_context"), |
435 | 435 |
KEY "fk_place_observation_community1_idx" ("community"), |
436 | 436 |
KEY "fk_place_observation_event1_idx" ("id"), |
437 |
CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
437 |
CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
438 |
CONSTRAINT "fk_place_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
438 | 439 |
CONSTRAINT "fk_place_observation_geological_context1" FOREIGN KEY ("geological_context") REFERENCES "geological_context" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
439 |
CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
440 |
CONSTRAINT "fk_place_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
440 |
CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
441 | 441 |
); |
442 | 442 |
/*!40101 SET character_set_client = @saved_cs_client */; |
443 | 443 |
|
... | ... | |
669 | 669 |
KEY "fk_specimen_individual1_idx" ("individual"), |
670 | 670 |
KEY "fk_specimen_collection2_idx" ("current_collection"), |
671 | 671 |
KEY "fk_specimen_organization3_idx" ("owner_collection"), |
672 |
CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
673 | 672 |
CONSTRAINT "fk_specimen_collection1" FOREIGN KEY ("orig_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
673 |
CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
674 |
CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
674 | 675 |
CONSTRAINT "fk_specimen_organization3" FOREIGN KEY ("owner_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
675 | 676 |
CONSTRAINT "fk_specimen_taxon_observation1" FOREIGN KEY ("collection_event") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
676 |
CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
677 |
CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
677 |
CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
678 | 678 |
); |
679 | 679 |
/*!40101 SET character_set_client = @saved_cs_client */; |
680 | 680 |
|
... | ... | |
697 | 697 |
"traits" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
698 | 698 |
PRIMARY KEY ("id"), |
699 | 699 |
KEY "fk_specimen_observation_specimen1_idx" ("specimen"), |
700 |
CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
701 |
CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
700 |
CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
701 |
CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
702 | 702 |
); |
703 | 703 |
/*!40101 SET character_set_client = @saved_cs_client */; |
704 | 704 |
|
... | ... | |
722 | 722 |
PRIMARY KEY ("specimen","institution"), |
723 | 723 |
KEY "fk_specimen_has_organization_organization1_idx" ("institution"), |
724 | 724 |
KEY "fk_specimen_has_organization_specimen1_idx" ("specimen"), |
725 |
CONSTRAINT "fk_specimen_has_organization_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
726 |
CONSTRAINT "fk_specimen_has_organization_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
725 |
CONSTRAINT "fk_specimen_has_organization_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
726 |
CONSTRAINT "fk_specimen_has_organization_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
727 | 727 |
); |
728 | 728 |
/*!40101 SET character_set_client = @saved_cs_client */; |
729 | 729 |
|
... | ... | |
773 | 773 |
KEY "fk_stem_observation_individual_observation1_idx" ("individual_observation"), |
774 | 774 |
KEY "fk_stem_observation_stem1_idx" ("stem"), |
775 | 775 |
CONSTRAINT "fk_stem_observation_individual_observation1" FOREIGN KEY ("individual_observation") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
776 |
CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
777 |
CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
776 |
CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
777 |
CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
778 | 778 |
); |
779 | 779 |
/*!40101 SET character_set_client = @saved_cs_client */; |
780 | 780 |
|
... | ... | |
845 | 845 |
KEY "fk_taxon_assertion_taxon_string1_idx" ("string"), |
846 | 846 |
KEY "fk_taxon_assertion_taxon_name1_idx" ("taxon"), |
847 | 847 |
CONSTRAINT "fk_qualified_taxon_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
848 |
CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
849 |
CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
848 |
CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
849 |
CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE
|
|
850 | 850 |
); |
851 | 851 |
/*!40101 SET character_set_client = @saved_cs_client */; |
852 | 852 |
|
... | ... | |
873 | 873 |
KEY "fk_taxon_taxon1_idx" ("parent"), |
874 | 874 |
KEY "fk_taxon_concept_source1_idx" ("according_to"), |
875 | 875 |
KEY "fk_taxon_concept_taxon_concept1_idx" ("accepted_taxon_concept"), |
876 |
CONSTRAINT "fk_taxon_taxon1" FOREIGN KEY ("parent") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
877 | 876 |
CONSTRAINT "fk_taxon_concept_source1" FOREIGN KEY ("according_to") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
878 | 877 |
CONSTRAINT "fk_taxon_concept_taxon_concept1" FOREIGN KEY ("accepted_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
879 |
CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
878 |
CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
879 |
CONSTRAINT "fk_taxon_taxon1" FOREIGN KEY ("parent") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
880 | 880 |
); |
881 | 881 |
/*!40101 SET character_set_client = @saved_cs_client */; |
882 | 882 |
|
... | ... | |
902 | 902 |
UNIQUE KEY "taxon_determination_unique" ("taxon_assertion","identified_by"), |
903 | 903 |
KEY "fk_taxon_occurrence_has_qualified_taxon1_idx" ("taxon_assertion"), |
904 | 904 |
KEY "fk_taxon_determination_party1_idx" ("identified_by"), |
905 |
CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
905 |
CONSTRAINT "fk_taxon_determination_party1" FOREIGN KEY ("identified_by") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
906 | 906 |
CONSTRAINT "fk_taxon_determination_record1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
907 |
CONSTRAINT "fk_taxon_determination_party1" FOREIGN KEY ("identified_by") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
907 |
CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
908 | 908 |
); |
909 | 909 |
/*!40101 SET character_set_client = @saved_cs_client */; |
910 | 910 |
|
... | ... | |
931 | 931 |
"rank" varbinary(767) DEFAULT NULL, |
932 | 932 |
PRIMARY KEY ("id"), |
933 | 933 |
KEY "fk_taxon_concept_taxon_string10_idx" ("unique_name"), |
934 |
CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
935 |
CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE
|
|
934 |
CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
935 |
CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
936 | 936 |
); |
937 | 937 |
/*!40101 SET character_set_client = @saved_cs_client */; |
938 | 938 |
|
... | ... | |
963 | 963 |
KEY "fk_taxon_observation_specimen1_idx" ("voucher"), |
964 | 964 |
KEY "fk_taxon_observation_party1_idx" ("collector"), |
965 | 965 |
CONSTRAINT "fk_taxon_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
966 |
CONSTRAINT "fk_taxon_observation_taxon_occurrence2" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
966 |
CONSTRAINT "fk_taxon_observation_party1" FOREIGN KEY ("collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
967 | 967 |
CONSTRAINT "fk_taxon_observation_specimen1" FOREIGN KEY ("voucher") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
968 |
CONSTRAINT "fk_taxon_observation_party1" FOREIGN KEY ("collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
968 |
CONSTRAINT "fk_taxon_observation_taxon_occurrence2" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
969 | 969 |
); |
970 | 970 |
/*!40101 SET character_set_client = @saved_cs_client */; |
971 | 971 |
|
... | ... | |
989 | 989 |
PRIMARY KEY ("id"), |
990 | 990 |
KEY "fk_taxon_occurrence_taxon_determination1_idx" ("original_determination"), |
991 | 991 |
KEY "fk_taxon_occurrence_taxon_determination2_idx" ("current_determination"), |
992 |
CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
992 | 993 |
CONSTRAINT "fk_taxon_occurrence_taxon_determination1" FOREIGN KEY ("original_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
993 |
CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
994 |
CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
994 |
CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
995 | 995 |
); |
996 | 996 |
/*!40101 SET character_set_client = @saved_cs_client */; |
997 | 997 |
|
... | ... | |
1086 | 1086 |
UNIQUE KEY "validatable_place_unique" ("path","coordinates"), |
1087 | 1087 |
KEY "fk_geovalidation_place_path1_idx" ("path"), |
1088 | 1088 |
KEY "fk_geovalidation_coordinates1_idx" ("coordinates"), |
1089 |
CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
1090 |
CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
1089 |
CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
1090 |
CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
1091 | 1091 |
); |
1092 | 1092 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1093 | 1093 |
|
schemas/VegCore/VegCore.pg.sql | ||
---|---|---|
4 | 4 |
-- |
5 | 5 |
-- Host: localhost Database: VegCore |
6 | 6 |
-- ------------------------------------------------------ |
7 |
-- Server version 5.5.31-0ubuntu0.12.04.1
|
|
7 |
-- Server version 5.5.31-0ubuntu0.12.04.2
|
|
8 | 8 |
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; |
9 | 9 |
/*!40103 SET TIME_ZONE='+00:00' */; |
10 | 10 |
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; |
... | ... | |
24 | 24 |
"traits" hstore DEFAULT NULL, |
25 | 25 |
PRIMARY KEY ("id"), |
26 | 26 |
/*KEY "fk_aggregate_observation_taxon_name1_idx" ("taxon_concept")*/CHECK (true), |
27 |
/*CONSTRAINT "fk_aggregate_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
28 |
/*CONSTRAINT "fk_aggregate_observation_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
27 |
/*CONSTRAINT "fk_aggregate_observation_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
28 |
/*CONSTRAINT "fk_aggregate_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
29 | 29 |
); |
30 | 30 |
/*!40101 SET character_set_client = @saved_cs_client */; |
31 | 31 |
|
... | ... | |
47 | 47 |
"referenced_class" text NOT NULL, |
48 | 48 |
PRIMARY KEY ("id"), |
49 | 49 |
/*KEY "fk_base_class_referenced_class1_idx" ("referenced_class")*/CHECK (true), |
50 |
/*CONSTRAINT "fk_example_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
51 |
/*CONSTRAINT "fk_base_class_referenced_class1" FOREIGN KEY ("referenced_class") REFERENCES "referenced_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
50 |
/*CONSTRAINT "fk_base_class_referenced_class1" FOREIGN KEY ("referenced_class") REFERENCES "referenced_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
51 |
/*CONSTRAINT "fk_example_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
52 | 52 |
); |
53 | 53 |
/*!40101 SET character_set_client = @saved_cs_client */; |
54 | 54 |
|
... | ... | |
73 | 73 |
/*CONSTRAINT "collection_unique" */UNIQUE ("institution","name"), |
74 | 74 |
/*KEY "fk_collection_organization1_idx" ("institution")*/CHECK (true), |
75 | 75 |
/*KEY "fk_collection_source1_idx" ("id")*/CHECK (true), |
76 |
/*CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
77 |
/*CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
76 |
/*CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
77 |
/*CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
78 | 78 |
); |
79 | 79 |
/*!40101 SET character_set_client = @saved_cs_client */; |
80 | 80 |
|
... | ... | |
165 | 165 |
/*KEY "fk_event_place1_idx" ("place")*/CHECK (true), |
166 | 166 |
/*KEY "fk_event1_idx" ("parent")*/CHECK (true), |
167 | 167 |
/*KEY "fk_event_method1_idx" ("method")*/CHECK (true), |
168 |
/*CONSTRAINT "fk_event_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
168 |
/*CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
169 |
/*CONSTRAINT "fk_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
169 | 170 |
/*CONSTRAINT "fk_event_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
170 |
/*CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
171 |
/*CONSTRAINT "fk_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
171 |
/*CONSTRAINT "fk_event_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
172 | 172 |
); |
173 | 173 |
/*!40101 SET character_set_client = @saved_cs_client */; |
174 | 174 |
|
... | ... | |
283 | 283 |
"traits" hstore DEFAULT NULL, |
284 | 284 |
PRIMARY KEY ("id"), |
285 | 285 |
/*KEY "fk_individual_observation_individual1_idx" ("individual")*/CHECK (true), |
286 |
/*CONSTRAINT "fk_individual_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
287 |
/*CONSTRAINT "fk_individual_observation_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
286 |
/*CONSTRAINT "fk_individual_observation_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
287 |
/*CONSTRAINT "fk_individual_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
288 | 288 |
); |
289 | 289 |
/*!40101 SET character_set_client = @saved_cs_client */; |
290 | 290 |
|
... | ... | |
307 | 307 |
"info" hstore DEFAULT NULL, |
308 | 308 |
PRIMARY KEY ("id"), |
309 | 309 |
/*KEY "fk_method_method1_idx" ("parent")*/CHECK (true), |
310 |
/*CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
311 |
/*CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
310 |
/*CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
311 |
/*CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
312 | 312 |
); |
313 | 313 |
/*!40101 SET character_set_client = @saved_cs_client */; |
314 | 314 |
|
... | ... | |
402 | 402 |
/*KEY "fk_place_coordinates1_idx" ("coordinates")*/CHECK (true), |
403 | 403 |
/*KEY "fk_place1_idx" ("parent")*/CHECK (true), |
404 | 404 |
/*KEY "fk_place_place_path1_idx" ("path")*/CHECK (true), |
405 |
/*CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
405 |
/*CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
406 | 406 |
/*CONSTRAINT "fk_place_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
407 |
/*CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
408 |
/*CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
407 |
/*CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
408 |
/*CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
409 | 409 |
); |
410 | 410 |
/*!40101 SET character_set_client = @saved_cs_client */; |
411 | 411 |
|
... | ... | |
436 | 436 |
/*KEY "fk_place_observation_geological_context1_idx" ("geological_context")*/CHECK (true), |
437 | 437 |
/*KEY "fk_place_observation_community1_idx" ("community")*/CHECK (true), |
438 | 438 |
/*KEY "fk_place_observation_event1_idx" ("id")*/CHECK (true), |
439 |
/*CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
439 |
/*CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
440 |
/*CONSTRAINT "fk_place_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
440 | 441 |
/*CONSTRAINT "fk_place_observation_geological_context1" FOREIGN KEY ("geological_context") REFERENCES "geological_context" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
441 |
/*CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
442 |
/*CONSTRAINT "fk_place_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
442 |
/*CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
443 | 443 |
); |
444 | 444 |
/*!40101 SET character_set_client = @saved_cs_client */; |
445 | 445 |
|
... | ... | |
671 | 671 |
/*KEY "fk_specimen_individual1_idx" ("individual")*/CHECK (true), |
672 | 672 |
/*KEY "fk_specimen_collection2_idx" ("current_collection")*/CHECK (true), |
673 | 673 |
/*KEY "fk_specimen_organization3_idx" ("owner_collection")*/CHECK (true), |
674 |
/*CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
675 | 674 |
/*CONSTRAINT "fk_specimen_collection1" FOREIGN KEY ("orig_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
675 |
/*CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
676 |
/*CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
676 | 677 |
/*CONSTRAINT "fk_specimen_organization3" FOREIGN KEY ("owner_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
677 | 678 |
/*CONSTRAINT "fk_specimen_taxon_observation1" FOREIGN KEY ("collection_event") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
678 |
/*CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
679 |
/*CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
679 |
/*CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
680 | 680 |
); |
681 | 681 |
/*!40101 SET character_set_client = @saved_cs_client */; |
682 | 682 |
|
... | ... | |
699 | 699 |
"traits" hstore DEFAULT NULL, |
700 | 700 |
PRIMARY KEY ("id"), |
701 | 701 |
/*KEY "fk_specimen_observation_specimen1_idx" ("specimen")*/CHECK (true), |
702 |
/*CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
703 |
/*CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
702 |
/*CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
703 |
/*CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
704 | 704 |
); |
705 | 705 |
/*!40101 SET character_set_client = @saved_cs_client */; |
706 | 706 |
|
... | ... | |
724 | 724 |
PRIMARY KEY ("specimen","institution"), |
725 | 725 |
/*KEY "fk_specimen_has_organization_organization1_idx" ("institution")*/CHECK (true), |
726 | 726 |
/*KEY "fk_specimen_has_organization_specimen1_idx" ("specimen")*/CHECK (true), |
727 |
/*CONSTRAINT "fk_specimen_has_organization_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
728 |
/*CONSTRAINT "fk_specimen_has_organization_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
727 |
/*CONSTRAINT "fk_specimen_has_organization_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
728 |
/*CONSTRAINT "fk_specimen_has_organization_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
729 | 729 |
); |
730 | 730 |
/*!40101 SET character_set_client = @saved_cs_client */; |
731 | 731 |
|
... | ... | |
775 | 775 |
/*KEY "fk_stem_observation_individual_observation1_idx" ("individual_observation")*/CHECK (true), |
776 | 776 |
/*KEY "fk_stem_observation_stem1_idx" ("stem")*/CHECK (true), |
777 | 777 |
/*CONSTRAINT "fk_stem_observation_individual_observation1" FOREIGN KEY ("individual_observation") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
778 |
/*CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
779 |
/*CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
778 |
/*CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
779 |
/*CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
780 | 780 |
); |
781 | 781 |
/*!40101 SET character_set_client = @saved_cs_client */; |
782 | 782 |
|
... | ... | |
847 | 847 |
/*KEY "fk_taxon_assertion_taxon_string1_idx" ("string")*/CHECK (true), |
848 | 848 |
/*KEY "fk_taxon_assertion_taxon_name1_idx" ("taxon")*/CHECK (true), |
849 | 849 |
/*CONSTRAINT "fk_qualified_taxon_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
850 |
/*CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
851 |
/*CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
850 |
/*CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
851 |
/*CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
852 | 852 |
); |
853 | 853 |
/*!40101 SET character_set_client = @saved_cs_client */; |
854 | 854 |
|
... | ... | |
875 | 875 |
/*KEY "fk_taxon_taxon1_idx" ("parent")*/CHECK (true), |
876 | 876 |
/*KEY "fk_taxon_concept_source1_idx" ("according_to")*/CHECK (true), |
877 | 877 |
/*KEY "fk_taxon_concept_taxon_concept1_idx" ("accepted_taxon_concept")*/CHECK (true), |
878 |
/*CONSTRAINT "fk_taxon_taxon1" FOREIGN KEY ("parent") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
879 | 878 |
/*CONSTRAINT "fk_taxon_concept_source1" FOREIGN KEY ("according_to") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
880 | 879 |
/*CONSTRAINT "fk_taxon_concept_taxon_concept1" FOREIGN KEY ("accepted_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
881 |
/*CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
880 |
/*CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
881 |
/*CONSTRAINT "fk_taxon_taxon1" FOREIGN KEY ("parent") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
882 | 882 |
); |
883 | 883 |
/*!40101 SET character_set_client = @saved_cs_client */; |
884 | 884 |
|
... | ... | |
904 | 904 |
/*CONSTRAINT "taxon_determination_unique" */UNIQUE ("taxon_assertion","identified_by"), |
905 | 905 |
/*KEY "fk_taxon_occurrence_has_qualified_taxon1_idx" ("taxon_assertion")*/CHECK (true), |
906 | 906 |
/*KEY "fk_taxon_determination_party1_idx" ("identified_by")*/CHECK (true), |
907 |
/*CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
907 |
/*CONSTRAINT "fk_taxon_determination_party1" FOREIGN KEY ("identified_by") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
908 | 908 |
/*CONSTRAINT "fk_taxon_determination_record1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
909 |
/*CONSTRAINT "fk_taxon_determination_party1" FOREIGN KEY ("identified_by") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
909 |
/*CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
910 | 910 |
); |
911 | 911 |
/*!40101 SET character_set_client = @saved_cs_client */; |
912 | 912 |
|
... | ... | |
933 | 933 |
"rank" text DEFAULT NULL, |
934 | 934 |
PRIMARY KEY ("id"), |
935 | 935 |
/*KEY "fk_taxon_concept_taxon_string10_idx" ("unique_name")*/CHECK (true), |
936 |
/*CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
937 |
/*CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
936 |
/*CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
937 |
/*CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
938 | 938 |
); |
939 | 939 |
/*!40101 SET character_set_client = @saved_cs_client */; |
940 | 940 |
|
... | ... | |
965 | 965 |
/*KEY "fk_taxon_observation_specimen1_idx" ("voucher")*/CHECK (true), |
966 | 966 |
/*KEY "fk_taxon_observation_party1_idx" ("collector")*/CHECK (true), |
967 | 967 |
/*CONSTRAINT "fk_taxon_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
968 |
/*CONSTRAINT "fk_taxon_observation_taxon_occurrence2" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
968 |
/*CONSTRAINT "fk_taxon_observation_party1" FOREIGN KEY ("collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
969 | 969 |
/*CONSTRAINT "fk_taxon_observation_specimen1" FOREIGN KEY ("voucher") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
970 |
/*CONSTRAINT "fk_taxon_observation_party1" FOREIGN KEY ("collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
970 |
/*CONSTRAINT "fk_taxon_observation_taxon_occurrence2" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
971 | 971 |
); |
972 | 972 |
/*!40101 SET character_set_client = @saved_cs_client */; |
973 | 973 |
|
... | ... | |
991 | 991 |
PRIMARY KEY ("id"), |
992 | 992 |
/*KEY "fk_taxon_occurrence_taxon_determination1_idx" ("original_determination")*/CHECK (true), |
993 | 993 |
/*KEY "fk_taxon_occurrence_taxon_determination2_idx" ("current_determination")*/CHECK (true), |
994 |
/*CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
994 | 995 |
/*CONSTRAINT "fk_taxon_occurrence_taxon_determination1" FOREIGN KEY ("original_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
995 |
/*CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
996 |
/*CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
996 |
/*CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
997 | 997 |
); |
998 | 998 |
/*!40101 SET character_set_client = @saved_cs_client */; |
999 | 999 |
|
... | ... | |
1088 | 1088 |
/*CONSTRAINT "validatable_place_unique" */UNIQUE ("path","coordinates"), |
1089 | 1089 |
/*KEY "fk_geovalidation_place_path1_idx" ("path")*/CHECK (true), |
1090 | 1090 |
/*KEY "fk_geovalidation_coordinates1_idx" ("coordinates")*/CHECK (true), |
1091 |
/*CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
1092 |
/*CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
1091 |
/*CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
1092 |
/*CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
1093 | 1093 |
); |
1094 | 1094 |
/*!40101 SET character_set_client = @saved_cs_client */; |
1095 | 1095 |
|
Also available in: Unified diff
schemas/VegCore/VegCore.pg.sql: regenerated from installed schema. a Linux bug that caused constraints to be output in reverse order has now been fixed, as of 12.04.2 (broken in 12.04.1).