Revision 9617
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/VegCore/VegCore.my.sql | ||
---|---|---|
20 | 20 |
"traits" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
21 | 21 |
PRIMARY KEY ("id"), |
22 | 22 |
KEY "fk_aggregate_observation_taxon_name1_idx" ("taxon_concept"), |
23 |
CONSTRAINT "fk_aggregate_observation_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
24 |
CONSTRAINT "fk_aggregate_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
23 |
CONSTRAINT "fk_aggregate_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
24 |
CONSTRAINT "fk_aggregate_observation_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
25 | 25 |
); |
26 | 26 |
|
27 | 27 |
-- |
... | ... | |
40 | 40 |
"referenced_class" varbinary(767) NOT NULL, |
41 | 41 |
PRIMARY KEY ("id"), |
42 | 42 |
KEY "fk_base_class_referenced_class1_idx" ("referenced_class"), |
43 |
CONSTRAINT "fk_base_class_referenced_class1" FOREIGN KEY ("referenced_class") REFERENCES "referenced_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
44 |
CONSTRAINT "fk_example_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
43 |
CONSTRAINT "fk_example_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
44 |
CONSTRAINT "fk_base_class_referenced_class1" FOREIGN KEY ("referenced_class") REFERENCES "referenced_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
45 | 45 |
); |
46 | 46 |
|
47 | 47 |
-- |
... | ... | |
63 | 63 |
UNIQUE KEY "collection_unique" ("institution","name"), |
64 | 64 |
KEY "fk_collection_organization1_idx" ("institution"), |
65 | 65 |
KEY "fk_collection_source1_idx" ("id"), |
66 |
CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
67 |
CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
66 |
CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
67 |
CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
68 | 68 |
); |
69 | 69 |
|
70 | 70 |
-- |
... | ... | |
143 | 143 |
KEY "fk_event_place1_idx" ("place"), |
144 | 144 |
KEY "fk_event1_idx" ("parent"), |
145 | 145 |
KEY "fk_event_method1_idx" ("method"), |
146 |
CONSTRAINT "fk_event_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
147 |
CONSTRAINT "fk_event_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
146 | 148 |
CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
147 |
CONSTRAINT "fk_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
148 |
CONSTRAINT "fk_event_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
149 |
CONSTRAINT "fk_event_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
149 |
CONSTRAINT "fk_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
150 | 150 |
); |
151 | 151 |
|
152 | 152 |
-- |
... | ... | |
246 | 246 |
"traits" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
247 | 247 |
PRIMARY KEY ("id"), |
248 | 248 |
KEY "fk_individual_observation_individual1_idx" ("individual"), |
249 |
CONSTRAINT "fk_individual_observation_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
250 |
CONSTRAINT "fk_individual_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
249 |
CONSTRAINT "fk_individual_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
250 |
CONSTRAINT "fk_individual_observation_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
251 | 251 |
); |
252 | 252 |
|
253 | 253 |
-- |
... | ... | |
267 | 267 |
"info" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
268 | 268 |
PRIMARY KEY ("id"), |
269 | 269 |
KEY "fk_method_method1_idx" ("parent"), |
270 |
CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
271 |
CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
270 |
CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
271 |
CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
272 | 272 |
); |
273 | 273 |
|
274 | 274 |
-- |
... | ... | |
350 | 350 |
KEY "fk_place_coordinates1_idx" ("coordinates"), |
351 | 351 |
KEY "fk_place1_idx" ("parent"), |
352 | 352 |
KEY "fk_place_place_path1_idx" ("path"), |
353 |
CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
354 |
CONSTRAINT "fk_place_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
353 | 355 |
CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
354 |
CONSTRAINT "fk_place_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
355 |
CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
356 |
CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
356 |
CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
357 | 357 |
); |
358 | 358 |
|
359 | 359 |
-- |
... | ... | |
381 | 381 |
KEY "fk_place_observation_geological_context1_idx" ("geological_context"), |
382 | 382 |
KEY "fk_place_observation_community1_idx" ("community"), |
383 | 383 |
KEY "fk_place_observation_event1_idx" ("id"), |
384 |
CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
385 |
CONSTRAINT "fk_place_observation_geological_context1" FOREIGN KEY ("geological_context") REFERENCES "geological_context" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
384 | 386 |
CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
385 |
CONSTRAINT "fk_place_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
386 |
CONSTRAINT "fk_place_observation_geological_context1" FOREIGN KEY ("geological_context") REFERENCES "geological_context" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
387 |
CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
387 |
CONSTRAINT "fk_place_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
388 | 388 |
); |
389 | 389 |
|
390 | 390 |
-- |
... | ... | |
551 | 551 |
PRIMARY KEY ("id"), |
552 | 552 |
UNIQUE KEY "source_unique" ("parent","name"), |
553 | 553 |
KEY "fk_source1_idx" ("parent"), |
554 |
KEY "fk_source_party1_idx" ("owner"), |
|
554 | 555 |
KEY "fk_source_party2_idx" ("first_publisher"), |
555 |
KEY "fk_source_party1_idx" ("owner"), |
|
556 | 556 |
CONSTRAINT "fk_source1" FOREIGN KEY ("parent") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
557 | 557 |
CONSTRAINT "fk_source_party1" FOREIGN KEY ("owner") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
558 | 558 |
CONSTRAINT "fk_source_party2" FOREIGN KEY ("first_publisher") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
... | ... | |
589 | 589 |
KEY "fk_specimen_individual1_idx" ("individual"), |
590 | 590 |
KEY "fk_specimen_collection2_idx" ("current_collection"), |
591 | 591 |
KEY "fk_specimen_organization3_idx" ("owner_collection"), |
592 |
CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
592 | 593 |
CONSTRAINT "fk_specimen_collection1" FOREIGN KEY ("orig_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
593 |
CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
594 |
CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
595 | 594 |
CONSTRAINT "fk_specimen_organization3" FOREIGN KEY ("owner_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
596 | 595 |
CONSTRAINT "fk_specimen_taxon_observation1" FOREIGN KEY ("collection_event") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
597 |
CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
596 |
CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
597 |
CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
598 | 598 |
); |
599 | 599 |
|
600 | 600 |
-- |
... | ... | |
614 | 614 |
"traits" set('hstore') COLLATE utf8_bin DEFAULT NULL, |
615 | 615 |
PRIMARY KEY ("id"), |
616 | 616 |
KEY "fk_specimen_observation_specimen1_idx" ("specimen"), |
617 |
CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
618 |
CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
617 |
CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
618 |
CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
619 | 619 |
); |
620 | 620 |
|
621 | 621 |
-- |
... | ... | |
626 | 626 |
/*!40000 ALTER TABLE "specimen_observation" ENABLE KEYS */; |
627 | 627 |
|
628 | 628 |
-- |
629 |
-- Table structure for table "specimenholder_institution" |
|
630 |
-- |
|
631 |
|
|
632 |
CREATE TABLE "specimenholder_institution" ( |
|
633 |
"specimen" varbinary(767) NOT NULL, |
|
634 |
"institution" varbinary(767) NOT NULL, |
|
635 |
"sort_order" int(11) DEFAULT NULL, |
|
636 |
PRIMARY KEY ("specimen","institution"), |
|
637 |
KEY "fk_specimen_has_organization_organization1_idx" ("institution"), |
|
638 |
KEY "fk_specimen_has_organization_specimen1_idx" ("specimen"), |
|
639 |
CONSTRAINT "fk_specimen_has_organization_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
640 |
CONSTRAINT "fk_specimen_has_organization_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
641 |
); |
|
642 |
|
|
643 |
-- |
|
644 |
-- Dumping data for table "specimenholder_institution" |
|
645 |
-- |
|
646 |
|
|
647 |
/*!40000 ALTER TABLE "specimenholder_institution" DISABLE KEYS */; |
|
648 |
/*!40000 ALTER TABLE "specimenholder_institution" ENABLE KEYS */; |
|
649 |
|
|
650 |
-- |
|
629 | 651 |
-- Table structure for table "stem" |
630 | 652 |
-- |
631 | 653 |
|
... | ... | |
659 | 681 |
KEY "fk_stem_observation_individual_observation1_idx" ("individual_observation"), |
660 | 682 |
KEY "fk_stem_observation_stem1_idx" ("stem"), |
661 | 683 |
CONSTRAINT "fk_stem_observation_individual_observation1" FOREIGN KEY ("individual_observation") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
662 |
CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
663 |
CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
684 |
CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
685 |
CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
664 | 686 |
); |
665 | 687 |
|
666 | 688 |
-- |
... | ... | |
722 | 744 |
KEY "fk_taxon_assertion_taxon_string1_idx" ("string"), |
723 | 745 |
KEY "fk_taxon_assertion_taxon_name1_idx" ("taxon"), |
724 | 746 |
CONSTRAINT "fk_qualified_taxon_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
725 |
CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
726 |
CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE
|
|
747 |
CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
748 |
CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
727 | 749 |
); |
728 | 750 |
|
729 | 751 |
-- |
... | ... | |
747 | 769 |
KEY "fk_taxon_taxon1_idx" ("parent"), |
748 | 770 |
KEY "fk_taxon_concept_source1_idx" ("according_to"), |
749 | 771 |
KEY "fk_taxon_concept_taxon_concept1_idx" ("accepted_taxon_concept"), |
772 |
CONSTRAINT "fk_taxon_taxon1" FOREIGN KEY ("parent") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
750 | 773 |
CONSTRAINT "fk_taxon_concept_source1" FOREIGN KEY ("according_to") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
751 | 774 |
CONSTRAINT "fk_taxon_concept_taxon_concept1" FOREIGN KEY ("accepted_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
752 |
CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
753 |
CONSTRAINT "fk_taxon_taxon1" FOREIGN KEY ("parent") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
775 |
CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
754 | 776 |
); |
755 | 777 |
|
756 | 778 |
-- |
... | ... | |
773 | 795 |
UNIQUE KEY "taxon_determination_unique" ("taxon_assertion","identified_by"), |
774 | 796 |
KEY "fk_taxon_occurrence_has_qualified_taxon1_idx" ("taxon_assertion"), |
775 | 797 |
KEY "fk_taxon_determination_party1_idx" ("identified_by"), |
776 |
CONSTRAINT "fk_taxon_determination_party1" FOREIGN KEY ("identified_by") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
798 |
CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
777 | 799 |
CONSTRAINT "fk_taxon_determination_record1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
778 |
CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
800 |
CONSTRAINT "fk_taxon_determination_party1" FOREIGN KEY ("identified_by") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
779 | 801 |
); |
780 | 802 |
|
781 | 803 |
-- |
... | ... | |
799 | 821 |
"rank" varbinary(767) DEFAULT NULL, |
800 | 822 |
PRIMARY KEY ("id"), |
801 | 823 |
KEY "fk_taxon_concept_taxon_string10_idx" ("unique_name"), |
802 |
CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
803 |
CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
824 |
CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
825 |
CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE
|
|
804 | 826 |
); |
805 | 827 |
|
806 | 828 |
-- |
... | ... | |
828 | 850 |
KEY "fk_taxon_observation_specimen1_idx" ("voucher"), |
829 | 851 |
KEY "fk_taxon_observation_party1_idx" ("collector"), |
830 | 852 |
CONSTRAINT "fk_taxon_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
831 |
CONSTRAINT "fk_taxon_observation_party1" FOREIGN KEY ("collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
853 |
CONSTRAINT "fk_taxon_observation_taxon_occurrence2" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
832 | 854 |
CONSTRAINT "fk_taxon_observation_specimen1" FOREIGN KEY ("voucher") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
833 |
CONSTRAINT "fk_taxon_observation_taxon_occurrence2" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
855 |
CONSTRAINT "fk_taxon_observation_party1" FOREIGN KEY ("collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
834 | 856 |
); |
835 | 857 |
|
836 | 858 |
-- |
... | ... | |
851 | 873 |
PRIMARY KEY ("id"), |
852 | 874 |
KEY "fk_taxon_occurrence_taxon_determination1_idx" ("original_determination"), |
853 | 875 |
KEY "fk_taxon_occurrence_taxon_determination2_idx" ("current_determination"), |
854 |
CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
855 | 876 |
CONSTRAINT "fk_taxon_occurrence_taxon_determination1" FOREIGN KEY ("original_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
856 |
CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
877 |
CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE, |
|
878 |
CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE |
|
857 | 879 |
); |
858 | 880 |
|
859 | 881 |
-- |
... | ... | |
936 | 958 |
UNIQUE KEY "validatable_place_unique" ("path","coordinates"), |
937 | 959 |
KEY "fk_geovalidation_place_path1_idx" ("path"), |
938 | 960 |
KEY "fk_geovalidation_coordinates1_idx" ("coordinates"), |
939 |
CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
940 |
CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
961 |
CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
|
|
962 |
CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
941 | 963 |
); |
942 | 964 |
|
943 | 965 |
-- |
schemas/VegCore/VegCore.pg.sql | ||
---|---|---|
22 | 22 |
"traits" hstore DEFAULT NULL, |
23 | 23 |
PRIMARY KEY ("id"), |
24 | 24 |
/*KEY "fk_aggregate_observation_taxon_name1_idx" ("taxon_concept")*/CHECK (true), |
25 |
/*CONSTRAINT "fk_aggregate_observation_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
26 |
/*CONSTRAINT "fk_aggregate_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
25 |
/*CONSTRAINT "fk_aggregate_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
26 |
/*CONSTRAINT "fk_aggregate_observation_taxon_name1" FOREIGN KEY ("taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
27 | 27 |
); |
28 | 28 |
|
29 | 29 |
-- |
... | ... | |
42 | 42 |
"referenced_class" text NOT NULL, |
43 | 43 |
PRIMARY KEY ("id"), |
44 | 44 |
/*KEY "fk_base_class_referenced_class1_idx" ("referenced_class")*/CHECK (true), |
45 |
/*CONSTRAINT "fk_base_class_referenced_class1" FOREIGN KEY ("referenced_class") REFERENCES "referenced_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
46 |
/*CONSTRAINT "fk_example_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
45 |
/*CONSTRAINT "fk_example_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
46 |
/*CONSTRAINT "fk_base_class_referenced_class1" FOREIGN KEY ("referenced_class") REFERENCES "referenced_class" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
47 | 47 |
); |
48 | 48 |
|
49 | 49 |
-- |
... | ... | |
65 | 65 |
/*CONSTRAINT "collection_unique" */UNIQUE ("institution","name"), |
66 | 66 |
/*KEY "fk_collection_organization1_idx" ("institution")*/CHECK (true), |
67 | 67 |
/*KEY "fk_collection_source1_idx" ("id")*/CHECK (true), |
68 |
/*CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
69 |
/*CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
68 |
/*CONSTRAINT "fk_collection_source1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
69 |
/*CONSTRAINT "fk_collection_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
70 | 70 |
); |
71 | 71 |
|
72 | 72 |
-- |
... | ... | |
145 | 145 |
/*KEY "fk_event_place1_idx" ("place")*/CHECK (true), |
146 | 146 |
/*KEY "fk_event1_idx" ("parent")*/CHECK (true), |
147 | 147 |
/*KEY "fk_event_method1_idx" ("method")*/CHECK (true), |
148 |
/*CONSTRAINT "fk_event_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
149 |
/*CONSTRAINT "fk_event_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
148 | 150 |
/*CONSTRAINT "fk_event1" FOREIGN KEY ("parent") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
149 |
/*CONSTRAINT "fk_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
150 |
/*CONSTRAINT "fk_event_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
151 |
/*CONSTRAINT "fk_event_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
151 |
/*CONSTRAINT "fk_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
152 | 152 |
); |
153 | 153 |
|
154 | 154 |
-- |
... | ... | |
248 | 248 |
"traits" hstore DEFAULT NULL, |
249 | 249 |
PRIMARY KEY ("id"), |
250 | 250 |
/*KEY "fk_individual_observation_individual1_idx" ("individual")*/CHECK (true), |
251 |
/*CONSTRAINT "fk_individual_observation_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
252 |
/*CONSTRAINT "fk_individual_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
251 |
/*CONSTRAINT "fk_individual_observation_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
252 |
/*CONSTRAINT "fk_individual_observation_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
253 | 253 |
); |
254 | 254 |
|
255 | 255 |
-- |
... | ... | |
269 | 269 |
"info" hstore DEFAULT NULL, |
270 | 270 |
PRIMARY KEY ("id"), |
271 | 271 |
/*KEY "fk_method_method1_idx" ("parent")*/CHECK (true), |
272 |
/*CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
273 |
/*CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
272 |
/*CONSTRAINT "fk_method_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
273 |
/*CONSTRAINT "fk_method_method1" FOREIGN KEY ("parent") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
274 | 274 |
); |
275 | 275 |
|
276 | 276 |
-- |
... | ... | |
352 | 352 |
/*KEY "fk_place_coordinates1_idx" ("coordinates")*/CHECK (true), |
353 | 353 |
/*KEY "fk_place1_idx" ("parent")*/CHECK (true), |
354 | 354 |
/*KEY "fk_place_place_path1_idx" ("path")*/CHECK (true), |
355 |
/*CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
356 |
/*CONSTRAINT "fk_place_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
355 | 357 |
/*CONSTRAINT "fk_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
356 |
/*CONSTRAINT "fk_place_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
357 |
/*CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
358 |
/*CONSTRAINT "fk_place_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
358 |
/*CONSTRAINT "fk_place_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
359 | 359 |
); |
360 | 360 |
|
361 | 361 |
-- |
... | ... | |
383 | 383 |
/*KEY "fk_place_observation_geological_context1_idx" ("geological_context")*/CHECK (true), |
384 | 384 |
/*KEY "fk_place_observation_community1_idx" ("community")*/CHECK (true), |
385 | 385 |
/*KEY "fk_place_observation_event1_idx" ("id")*/CHECK (true), |
386 |
/*CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
387 |
/*CONSTRAINT "fk_place_observation_geological_context1" FOREIGN KEY ("geological_context") REFERENCES "geological_context" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
386 | 388 |
/*CONSTRAINT "fk_place_observation_community1" FOREIGN KEY ("community") REFERENCES "community" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
387 |
/*CONSTRAINT "fk_place_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
388 |
/*CONSTRAINT "fk_place_observation_geological_context1" FOREIGN KEY ("geological_context") REFERENCES "geological_context" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
389 |
/*CONSTRAINT "fk_place_observation_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
389 |
/*CONSTRAINT "fk_place_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
390 | 390 |
); |
391 | 391 |
|
392 | 392 |
-- |
... | ... | |
553 | 553 |
PRIMARY KEY ("id"), |
554 | 554 |
/*CONSTRAINT "source_unique" */UNIQUE ("parent","name"), |
555 | 555 |
/*KEY "fk_source1_idx" ("parent")*/CHECK (true), |
556 |
/*KEY "fk_source_party1_idx" ("owner")*/CHECK (true), |
|
556 | 557 |
/*KEY "fk_source_party2_idx" ("first_publisher")*/CHECK (true), |
557 |
/*KEY "fk_source_party1_idx" ("owner")*/CHECK (true), |
|
558 | 558 |
/*CONSTRAINT "fk_source1" FOREIGN KEY ("parent") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
559 | 559 |
/*CONSTRAINT "fk_source_party1" FOREIGN KEY ("owner") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
560 | 560 |
/*CONSTRAINT "fk_source_party2" FOREIGN KEY ("first_publisher") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
... | ... | |
591 | 591 |
/*KEY "fk_specimen_individual1_idx" ("individual")*/CHECK (true), |
592 | 592 |
/*KEY "fk_specimen_collection2_idx" ("current_collection")*/CHECK (true), |
593 | 593 |
/*KEY "fk_specimen_organization3_idx" ("owner_collection")*/CHECK (true), |
594 |
/*CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
594 | 595 |
/*CONSTRAINT "fk_specimen_collection1" FOREIGN KEY ("orig_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
595 |
/*CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
596 |
/*CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
597 | 596 |
/*CONSTRAINT "fk_specimen_organization3" FOREIGN KEY ("owner_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
598 | 597 |
/*CONSTRAINT "fk_specimen_taxon_observation1" FOREIGN KEY ("collection_event") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
599 |
/*CONSTRAINT "fk_specimen_taxon_occurrence1" FOREIGN KEY ("id") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
598 |
/*CONSTRAINT "fk_specimen_individual1" FOREIGN KEY ("individual") REFERENCES "individual" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
599 |
/*CONSTRAINT "fk_specimen_collection2" FOREIGN KEY ("current_collection") REFERENCES "collection" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
600 | 600 |
); |
601 | 601 |
|
602 | 602 |
-- |
... | ... | |
616 | 616 |
"traits" hstore DEFAULT NULL, |
617 | 617 |
PRIMARY KEY ("id"), |
618 | 618 |
/*KEY "fk_specimen_observation_specimen1_idx" ("specimen")*/CHECK (true), |
619 |
/*CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
620 |
/*CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
619 |
/*CONSTRAINT "fk_specimen_taxon_occurrence10" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
620 |
/*CONSTRAINT "fk_specimen_observation_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
621 | 621 |
); |
622 | 622 |
|
623 | 623 |
-- |
... | ... | |
628 | 628 |
/*!40000 ALTER TABLE "specimen_observation" ENABLE KEYS */; |
629 | 629 |
|
630 | 630 |
-- |
631 |
-- Table structure for table "specimenholder_institution" |
|
632 |
-- |
|
633 |
|
|
634 |
CREATE TABLE "specimenholder_institution" ( |
|
635 |
"specimen" text NOT NULL, |
|
636 |
"institution" text NOT NULL, |
|
637 |
"sort_order" integer DEFAULT NULL, |
|
638 |
PRIMARY KEY ("specimen","institution"), |
|
639 |
/*KEY "fk_specimen_has_organization_organization1_idx" ("institution")*/CHECK (true), |
|
640 |
/*KEY "fk_specimen_has_organization_specimen1_idx" ("specimen")*/CHECK (true), |
|
641 |
/*CONSTRAINT "fk_specimen_has_organization_specimen1" FOREIGN KEY ("specimen") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
642 |
/*CONSTRAINT "fk_specimen_has_organization_organization1" FOREIGN KEY ("institution") REFERENCES "organization" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
643 |
); |
|
644 |
|
|
645 |
-- |
|
646 |
-- Dumping data for table "specimenholder_institution" |
|
647 |
-- |
|
648 |
|
|
649 |
/*!40000 ALTER TABLE "specimenholder_institution" DISABLE KEYS */; |
|
650 |
/*!40000 ALTER TABLE "specimenholder_institution" ENABLE KEYS */; |
|
651 |
|
|
652 |
-- |
|
631 | 653 |
-- Table structure for table "stem" |
632 | 654 |
-- |
633 | 655 |
|
... | ... | |
661 | 683 |
/*KEY "fk_stem_observation_individual_observation1_idx" ("individual_observation")*/CHECK (true), |
662 | 684 |
/*KEY "fk_stem_observation_stem1_idx" ("stem")*/CHECK (true), |
663 | 685 |
/*CONSTRAINT "fk_stem_observation_individual_observation1" FOREIGN KEY ("individual_observation") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
664 |
/*CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
665 |
/*CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
686 |
/*CONSTRAINT "fk_stem_observation_stem1" FOREIGN KEY ("stem") REFERENCES "stem" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
687 |
/*CONSTRAINT "fk_stem_observation_individual_observation2" FOREIGN KEY ("id") REFERENCES "individual_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
666 | 688 |
); |
667 | 689 |
|
668 | 690 |
-- |
... | ... | |
724 | 746 |
/*KEY "fk_taxon_assertion_taxon_string1_idx" ("string")*/CHECK (true), |
725 | 747 |
/*KEY "fk_taxon_assertion_taxon_name1_idx" ("taxon")*/CHECK (true), |
726 | 748 |
/*CONSTRAINT "fk_qualified_taxon_record1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
727 |
/*CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
728 |
/*CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
749 |
/*CONSTRAINT "fk_taxon_assertion_taxon_string1" FOREIGN KEY ("string") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
750 |
/*CONSTRAINT "fk_taxon_assertion_taxon_name1" FOREIGN KEY ("taxon") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
729 | 751 |
); |
730 | 752 |
|
731 | 753 |
-- |
... | ... | |
749 | 771 |
/*KEY "fk_taxon_taxon1_idx" ("parent")*/CHECK (true), |
750 | 772 |
/*KEY "fk_taxon_concept_source1_idx" ("according_to")*/CHECK (true), |
751 | 773 |
/*KEY "fk_taxon_concept_taxon_concept1_idx" ("accepted_taxon_concept")*/CHECK (true), |
774 |
/*CONSTRAINT "fk_taxon_taxon1" FOREIGN KEY ("parent") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
752 | 775 |
/*CONSTRAINT "fk_taxon_concept_source1" FOREIGN KEY ("according_to") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
753 | 776 |
/*CONSTRAINT "fk_taxon_concept_taxon_concept1" FOREIGN KEY ("accepted_taxon_concept") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
754 |
/*CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
755 |
/*CONSTRAINT "fk_taxon_taxon1" FOREIGN KEY ("parent") REFERENCES "taxon_concept" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
777 |
/*CONSTRAINT "fk_taxon_concept_taxon_name1" FOREIGN KEY ("id") REFERENCES "taxon_name" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
756 | 778 |
); |
757 | 779 |
|
758 | 780 |
-- |
... | ... | |
775 | 797 |
/*CONSTRAINT "taxon_determination_unique" */UNIQUE ("taxon_assertion","identified_by"), |
776 | 798 |
/*KEY "fk_taxon_occurrence_has_qualified_taxon1_idx" ("taxon_assertion")*/CHECK (true), |
777 | 799 |
/*KEY "fk_taxon_determination_party1_idx" ("identified_by")*/CHECK (true), |
778 |
/*CONSTRAINT "fk_taxon_determination_party1" FOREIGN KEY ("identified_by") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
800 |
/*CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
779 | 801 |
/*CONSTRAINT "fk_taxon_determination_record1" FOREIGN KEY ("id") REFERENCES "taxon_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
780 |
/*CONSTRAINT "fk_taxon_occurrence_has_qualified_taxon1" FOREIGN KEY ("taxon_assertion") REFERENCES "taxon_assertion" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
802 |
/*CONSTRAINT "fk_taxon_determination_party1" FOREIGN KEY ("identified_by") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
781 | 803 |
); |
782 | 804 |
|
783 | 805 |
-- |
... | ... | |
801 | 823 |
"rank" text DEFAULT NULL, |
802 | 824 |
PRIMARY KEY ("id"), |
803 | 825 |
/*KEY "fk_taxon_concept_taxon_string10_idx" ("unique_name")*/CHECK (true), |
804 |
/*CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
805 |
/*CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
826 |
/*CONSTRAINT "fk_taxon_record10" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
827 |
/*CONSTRAINT "fk_taxon_concept_taxon_string10" FOREIGN KEY ("unique_name") REFERENCES "taxon_string" ("string") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
806 | 828 |
); |
807 | 829 |
|
808 | 830 |
-- |
... | ... | |
830 | 852 |
/*KEY "fk_taxon_observation_specimen1_idx" ("voucher")*/CHECK (true), |
831 | 853 |
/*KEY "fk_taxon_observation_party1_idx" ("collector")*/CHECK (true), |
832 | 854 |
/*CONSTRAINT "fk_taxon_observation_event1" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
833 |
/*CONSTRAINT "fk_taxon_observation_party1" FOREIGN KEY ("collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
855 |
/*CONSTRAINT "fk_taxon_observation_taxon_occurrence2" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
834 | 856 |
/*CONSTRAINT "fk_taxon_observation_specimen1" FOREIGN KEY ("voucher") REFERENCES "specimen" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
835 |
/*CONSTRAINT "fk_taxon_observation_taxon_occurrence2" FOREIGN KEY ("taxon_occurrence") REFERENCES "taxon_occurrence" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
857 |
/*CONSTRAINT "fk_taxon_observation_party1" FOREIGN KEY ("collector") REFERENCES "party" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
836 | 858 |
); |
837 | 859 |
|
838 | 860 |
-- |
... | ... | |
853 | 875 |
PRIMARY KEY ("id"), |
854 | 876 |
/*KEY "fk_taxon_occurrence_taxon_determination1_idx" ("original_determination")*/CHECK (true), |
855 | 877 |
/*KEY "fk_taxon_occurrence_taxon_determination2_idx" ("current_determination")*/CHECK (true), |
856 |
/*CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
857 | 878 |
/*CONSTRAINT "fk_taxon_occurrence_taxon_determination1" FOREIGN KEY ("original_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
858 |
/*CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
879 |
/*CONSTRAINT "fk_taxon_occurrence_taxon_determination2" FOREIGN KEY ("current_determination") REFERENCES "taxon_determination" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
880 |
/*CONSTRAINT "fk_taxon_occurrence_event1" FOREIGN KEY ("id") REFERENCES "record" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
859 | 881 |
); |
860 | 882 |
|
861 | 883 |
-- |
... | ... | |
938 | 960 |
/*CONSTRAINT "validatable_place_unique" */UNIQUE ("path","coordinates"), |
939 | 961 |
/*KEY "fk_geovalidation_place_path1_idx" ("path")*/CHECK (true), |
940 | 962 |
/*KEY "fk_geovalidation_coordinates1_idx" ("coordinates")*/CHECK (true), |
941 |
/*CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
942 |
/*CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
963 |
/*CONSTRAINT "fk_geovalidation_place_path1" FOREIGN KEY ("path") REFERENCES "place_path" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
964 |
/*CONSTRAINT "fk_geovalidation_coordinates1" FOREIGN KEY ("coordinates") REFERENCES "coordinates" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
943 | 965 |
); |
944 | 966 |
|
945 | 967 |
-- |
Also available in: Unified diff
schemas/VegCore/VegCore.my.sql, VegCore.pg.sql: synced to VegCore MySQL DB. for some reason, the fkeys are now output in the opposite order from what they were in before.