Revision 11108
Added by Aaron Marcuse-Kubitza over 10 years ago
VegCore.pg.sql | ||
---|---|---|
1115 | 1115 |
CREATE TABLE "taxa_sampling_event" ( |
1116 | 1116 |
"id" text NOT NULL, |
1117 | 1117 |
"within_place" text NOT NULL, |
1118 |
"place_observation" text DEFAULT NULL, |
|
1118 | 1119 |
"project" text DEFAULT NULL, |
1119 | 1120 |
"method" text DEFAULT NULL, |
1120 | 1121 |
PRIMARY KEY ("id"), |
1121 | 1122 |
/*KEY "fk_sampling_event_method1_idx" ("method")*/CHECK (true), |
1122 | 1123 |
/*KEY "fk_taxa_sampling_event_place1_idx" ("within_place")*/CHECK (true), |
1123 | 1124 |
/*KEY "fk_taxa_sampling_event_project1_idx" ("project")*/CHECK (true), |
1125 |
/*KEY "taxa_sampling_event_id_fkey1_idx" ("place_observation")*/CHECK (true), |
|
1124 | 1126 |
/*CONSTRAINT "fk_taxa_sampling_event_project1" FOREIGN KEY ("project") REFERENCES "project" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
1127 |
/*CONSTRAINT "fk_taxa_sampling_event_place1" FOREIGN KEY ("within_place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
1128 |
/*CONSTRAINT "taxa_sampling_event_id_fkey1" FOREIGN KEY ("place_observation") REFERENCES "place_observation" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
1125 | 1129 |
/*CONSTRAINT "fk_project_event10" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
1126 |
/*CONSTRAINT "fk_taxa_sampling_event_place1" FOREIGN KEY ("within_place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true), |
|
1127 | 1130 |
/*CONSTRAINT "fk_sampling_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true) |
1128 | 1131 |
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='for plots and aggregate_observations within them'*/; |
1129 | 1132 |
/*!40101 SET character_set_client = @saved_cs_client */; |
Also available in: Unified diff
schemas/VegCore/ERD/VegCore.ERD.mwb: taxa_sampling_event: added place_observation fkey for the concurrent place_observation, which contains all the info about the place (communities, soil data, etc.). this allows a taxon_observation to be traced to its associated location measurements.