Revision 10526
Added by Aaron Marcuse-Kubitza almost 11 years ago
VegCore.pg.sql | ||
---|---|---|
301 | 301 |
"tag_history" hstore DEFAULT NULL, |
302 | 302 |
PRIMARY KEY ("id"), |
303 | 303 |
/*KEY "fk_individual_place1_idx" ("place")*/CHECK (true), |
304 |
/*CONSTRAINT "fk_individual_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
305 |
/*CONSTRAINT "fk_individual_record1" FOREIGN KEY ("id") REFERENCES "reobservable" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
304 |
/*CONSTRAINT "fk_individual_record1" FOREIGN KEY ("id") REFERENCES "reobservable" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
|
|
305 |
/*CONSTRAINT "fk_individual_place1" FOREIGN KEY ("place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
|
|
306 | 306 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A distinct biological organism'*/; |
307 | 307 |
/*!40101 SET character_set_client = @saved_cs_client */; |
308 | 308 |
|
... | ... | |
613 | 613 |
/*!40000 ALTER TABLE "referenced_class" ENABLE KEYS */; |
614 | 614 |
|
615 | 615 |
-- |
616 |
-- Table structure for table "rel_place" |
|
617 |
-- |
|
618 |
|
|
619 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
620 |
/*!40101 SET character_set_client = utf8 */; |
|
621 |
CREATE TABLE "rel_place" ( |
|
622 |
"id" text NOT NULL, |
|
623 |
"parent" text NOT NULL, |
|
624 |
"x_m" double precision DEFAULT NULL, |
|
625 |
"y_m" double precision DEFAULT NULL, |
|
626 |
"coords" hstore DEFAULT NULL, |
|
627 |
PRIMARY KEY ("id"), |
|
628 |
/*KEY "fk_rel_place_place1_idx" ("parent")*/CHECK (true), |
|
629 |
/*CONSTRAINT "fk_rel_place_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
630 |
/*CONSTRAINT "fk_subplot_place2" FOREIGN KEY ("id") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
631 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='stores plot elements such as subplots ("subplot, line, or any other subsample or subdivision of plot" ("SALVIAS":http://salvias.net/Documents/salvias_data_dictionary.html#Plot_data/subplot))'*/; |
|
632 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
633 |
|
|
634 |
-- |
|
635 |
-- Dumping data for table "rel_place" |
|
636 |
-- |
|
637 |
|
|
638 |
/*!40000 ALTER TABLE "rel_place" DISABLE KEYS */; |
|
639 |
/*!40000 ALTER TABLE "rel_place" ENABLE KEYS */; |
|
640 |
|
|
641 |
-- |
|
642 | 616 |
-- Table structure for table "relationship" |
643 | 617 |
-- |
644 | 618 |
|
... | ... | |
933 | 907 |
/*!40000 ALTER TABLE "stratum" ENABLE KEYS */; |
934 | 908 |
|
935 | 909 |
-- |
910 |
-- Table structure for table "subplace" |
|
911 |
-- |
|
912 |
|
|
913 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
914 |
/*!40101 SET character_set_client = utf8 */; |
|
915 |
CREATE TABLE "subplace" ( |
|
916 |
"id" text NOT NULL, |
|
917 |
"parent" text NOT NULL, |
|
918 |
"x_m" double precision DEFAULT NULL, |
|
919 |
"y_m" double precision DEFAULT NULL, |
|
920 |
"coords" hstore DEFAULT NULL, |
|
921 |
PRIMARY KEY ("id"), |
|
922 |
/*KEY "fk_rel_place_place1_idx" ("parent")*/CHECK (true), |
|
923 |
/*CONSTRAINT "fk_subplot_place2" FOREIGN KEY ("id") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
924 |
/*CONSTRAINT "fk_rel_place_place1" FOREIGN KEY ("parent") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
925 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='stores plot elements such as subplots ("subplot, line, or any other subsample or subdivision of plot" ("SALVIAS":http://salvias.net/Documents/salvias_data_dictionary.html#Plot_data/subplot))'*/; |
|
926 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
927 |
|
|
928 |
-- |
|
929 |
-- Dumping data for table "subplace" |
|
930 |
-- |
|
931 |
|
|
932 |
/*!40000 ALTER TABLE "subplace" DISABLE KEYS */; |
|
933 |
/*!40000 ALTER TABLE "subplace" ENABLE KEYS */; |
|
934 |
|
|
935 |
-- |
|
936 | 936 |
-- Table structure for table "subplot" |
937 | 937 |
-- |
938 | 938 |
|
... | ... | |
943 | 943 |
"parent_plot" text NOT NULL, |
944 | 944 |
PRIMARY KEY ("id"), |
945 | 945 |
/*KEY "fk_subplot_plot2_idx" ("parent_plot")*/CHECK (true), |
946 |
/*CONSTRAINT "fk_subplot_plot1" FOREIGN KEY ("id") REFERENCES "plot" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
946 | 947 |
/*CONSTRAINT "fk_subplot_plot2" FOREIGN KEY ("parent_plot") REFERENCES "plot" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
947 |
/*CONSTRAINT "fk_subplot_rel_place1" FOREIGN KEY ("id") REFERENCES "rel_place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
948 |
/*CONSTRAINT "fk_subplot_plot1" FOREIGN KEY ("id") REFERENCES "plot" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
948 |
/*CONSTRAINT "fk_subplot_rel_place1" FOREIGN KEY ("id") REFERENCES "subplace" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
|
949 | 949 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin*/; |
950 | 950 |
/*!40101 SET character_set_client = @saved_cs_client */; |
951 | 951 |
|
Also available in: Unified diff
schemas/VegCore/VegCore.ERD.mwb: rel_place: renamed to subplace to clarify that this is any place contained within another place, not just places with a position relative to their parent place