Revision 10521
Added by Aaron Marcuse-Kubitza almost 11 years ago
VegCore.my.sql | ||
---|---|---|
294 | 294 |
/*!40101 SET character_set_client = utf8 */; |
295 | 295 |
CREATE TABLE `individual` ( |
296 | 296 |
`id` varbinary(767) NOT NULL, |
297 |
`plot_position` varbinary(767) DEFAULT NULL,
|
|
297 |
`place` varbinary(767) NOT NULL,
|
|
298 | 298 |
`tag` varbinary(767) DEFAULT NULL, |
299 | 299 |
`tag_history` set('hstore') COLLATE utf8_bin DEFAULT NULL, |
300 | 300 |
PRIMARY KEY (`id`), |
301 |
KEY `fk_individual_plot_element1_idx` (`plot_position`),
|
|
302 |
CONSTRAINT `fk_individual_plot_element1` FOREIGN KEY (`plot_position`) REFERENCES `plot_element` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
301 |
KEY `fk_individual_rel_place1_idx` (`place`),
|
|
302 |
CONSTRAINT `fk_individual_rel_place1` FOREIGN KEY (`place`) REFERENCES `rel_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
303 | 303 |
CONSTRAINT `fk_individual_record1` FOREIGN KEY (`id`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
304 | 304 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A distinct biological organism'; |
305 | 305 |
/*!40101 SET character_set_client = @saved_cs_client */; |
Also available in: Unified diff
schemas/VegCore/VegCore.ERD.mwb: individual: require it to have a place (which may be a rel_place within another place). do not require the place to be a plot_element, because individuals can be located in places other than uniformly-shaped plots.