Revision 8565
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/VegCore/VegCore.my.sql | ||
---|---|---|
269 | 269 |
|
270 | 270 |
|
271 | 271 |
-- ----------------------------------------------------- |
272 |
-- Table `place_path` |
|
273 |
-- ----------------------------------------------------- |
|
274 |
CREATE TABLE IF NOT EXISTS `place_path` ( |
|
275 |
`id` TEXT NOT NULL , |
|
276 |
PRIMARY KEY (`id`) , |
|
277 |
CONSTRAINT `fk_place_path_record1` |
|
278 |
FOREIGN KEY (`id` ) |
|
279 |
REFERENCES `record` (`id` ) |
|
280 |
ON DELETE CASCADE |
|
281 |
ON UPDATE CASCADE) |
|
282 |
ENGINE = InnoDB |
|
283 |
DEFAULT CHARACTER SET = latin1 |
|
284 |
COLLATE = latin1_swedish_ci; |
|
285 |
|
|
286 |
|
|
287 |
-- ----------------------------------------------------- |
|
288 | 272 |
-- Table `place` |
289 | 273 |
-- ----------------------------------------------------- |
290 | 274 |
CREATE TABLE IF NOT EXISTS `place` ( |
291 | 275 |
`id` TEXT NOT NULL , |
292 | 276 |
`parent` TEXT NOT NULL , |
293 |
`place_path` TEXT NULL , |
|
294 | 277 |
`coordinates` TEXT NULL , |
295 | 278 |
PRIMARY KEY (`id`) , |
296 | 279 |
INDEX `fk_place_coordinates1` (`coordinates` ASC) , |
297 |
INDEX `fk_place_placename1` (`place_path` ASC) , |
|
298 | 280 |
INDEX `fk_place1` (`parent` ASC) , |
299 | 281 |
CONSTRAINT `fk_place_record1` |
300 | 282 |
FOREIGN KEY (`id` ) |
... | ... | |
306 | 288 |
REFERENCES `coordinates` (`id` ) |
307 | 289 |
ON DELETE CASCADE |
308 | 290 |
ON UPDATE CASCADE, |
309 |
CONSTRAINT `fk_place_placename1` |
|
310 |
FOREIGN KEY (`place_path` ) |
|
311 |
REFERENCES `place_path` (`id` ) |
|
312 |
ON DELETE CASCADE |
|
313 |
ON UPDATE CASCADE, |
|
314 | 291 |
CONSTRAINT `fk_place1` |
315 | 292 |
FOREIGN KEY (`parent` ) |
316 | 293 |
REFERENCES `place` (`id` ) |
... | ... | |
741 | 718 |
|
742 | 719 |
|
743 | 720 |
-- ----------------------------------------------------- |
721 |
-- Table `place_path` |
|
722 |
-- ----------------------------------------------------- |
|
723 |
CREATE TABLE IF NOT EXISTS `place_path` ( |
|
724 |
`id` TEXT NOT NULL , |
|
725 |
PRIMARY KEY (`id`) , |
|
726 |
CONSTRAINT `fk_place_path_record1` |
|
727 |
FOREIGN KEY (`id` ) |
|
728 |
REFERENCES `record` (`id` ) |
|
729 |
ON DELETE CASCADE |
|
730 |
ON UPDATE CASCADE, |
|
731 |
CONSTRAINT `fk_place_path_place1` |
|
732 |
FOREIGN KEY (`id` ) |
|
733 |
REFERENCES `place` (`id` ) |
|
734 |
ON DELETE CASCADE |
|
735 |
ON UPDATE CASCADE) |
|
736 |
ENGINE = InnoDB |
|
737 |
DEFAULT CHARACTER SET = latin1 |
|
738 |
COLLATE = latin1_swedish_ci; |
|
739 |
|
|
740 |
|
|
741 |
-- ----------------------------------------------------- |
|
744 | 742 |
-- Table `geovalidation` |
745 | 743 |
-- ----------------------------------------------------- |
746 | 744 |
CREATE TABLE IF NOT EXISTS `geovalidation` ( |
Also available in: Unified diff
schemas/VegCore/VegCore.ERD.mwb: made place_path extend place instead of place having a place_path, because place_path now provides an optional set of fields that a place may provide, rather than being a completely separate entity