Revision 8564
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/VegCore/VegCore.my.sql | ||
---|---|---|
269 | 269 |
|
270 | 270 |
|
271 | 271 |
-- ----------------------------------------------------- |
272 |
-- Table `named_place`
|
|
272 |
-- Table `place_path`
|
|
273 | 273 |
-- ----------------------------------------------------- |
274 |
CREATE TABLE IF NOT EXISTS `named_place` (
|
|
274 |
CREATE TABLE IF NOT EXISTS `place_path` (
|
|
275 | 275 |
`id` TEXT NOT NULL , |
276 | 276 |
PRIMARY KEY (`id`) , |
277 |
CONSTRAINT `fk_named_place_record1`
|
|
277 |
CONSTRAINT `fk_place_path_record1`
|
|
278 | 278 |
FOREIGN KEY (`id` ) |
279 | 279 |
REFERENCES `record` (`id` ) |
280 | 280 |
ON DELETE CASCADE |
... | ... | |
290 | 290 |
CREATE TABLE IF NOT EXISTS `place` ( |
291 | 291 |
`id` TEXT NOT NULL , |
292 | 292 |
`parent` TEXT NOT NULL , |
293 |
`named_place` TEXT NULL ,
|
|
293 |
`place_path` TEXT NULL ,
|
|
294 | 294 |
`coordinates` TEXT NULL , |
295 | 295 |
PRIMARY KEY (`id`) , |
296 | 296 |
INDEX `fk_place_coordinates1` (`coordinates` ASC) , |
297 |
INDEX `fk_place_placename1` (`named_place` ASC) ,
|
|
297 |
INDEX `fk_place_placename1` (`place_path` ASC) ,
|
|
298 | 298 |
INDEX `fk_place1` (`parent` ASC) , |
299 | 299 |
CONSTRAINT `fk_place_record1` |
300 | 300 |
FOREIGN KEY (`id` ) |
... | ... | |
307 | 307 |
ON DELETE CASCADE |
308 | 308 |
ON UPDATE CASCADE, |
309 | 309 |
CONSTRAINT `fk_place_placename1` |
310 |
FOREIGN KEY (`named_place` )
|
|
311 |
REFERENCES `named_place` (`id` )
|
|
310 |
FOREIGN KEY (`place_path` )
|
|
311 |
REFERENCES `place_path` (`id` )
|
|
312 | 312 |
ON DELETE CASCADE |
313 | 313 |
ON UPDATE CASCADE, |
314 | 314 |
CONSTRAINT `fk_place1` |
... | ... | |
745 | 745 |
-- ----------------------------------------------------- |
746 | 746 |
CREATE TABLE IF NOT EXISTS `geovalidation` ( |
747 | 747 |
`id` TEXT NOT NULL , |
748 |
`named_place` TEXT NOT NULL ,
|
|
748 |
`place_path` TEXT NOT NULL ,
|
|
749 | 749 |
`coordinates` TEXT NOT NULL , |
750 | 750 |
PRIMARY KEY (`id`) , |
751 | 751 |
INDEX `fk_geovalidation_coordinates1` (`coordinates` ASC) , |
752 |
INDEX `fk_geovalidation_placename1` (`named_place` ASC) ,
|
|
752 |
INDEX `fk_geovalidation_placename1` (`place_path` ASC) ,
|
|
753 | 753 |
CONSTRAINT `fk_geovalidation_record1` |
754 | 754 |
FOREIGN KEY (`id` ) |
755 | 755 |
REFERENCES `record` (`id` ) |
... | ... | |
761 | 761 |
ON DELETE CASCADE |
762 | 762 |
ON UPDATE CASCADE, |
763 | 763 |
CONSTRAINT `fk_geovalidation_placename1` |
764 |
FOREIGN KEY (`named_place` )
|
|
765 |
REFERENCES `named_place` (`id` )
|
|
764 |
FOREIGN KEY (`place_path` )
|
|
765 |
REFERENCES `place_path` (`id` )
|
|
766 | 766 |
ON DELETE CASCADE |
767 | 767 |
ON UPDATE CASCADE) |
768 | 768 |
ENGINE = InnoDB |
... | ... | |
879 | 879 |
CREATE TABLE IF NOT EXISTS `stratum` ( |
880 | 880 |
`id` TEXT NOT NULL , |
881 | 881 |
PRIMARY KEY (`id`) , |
882 |
CONSTRAINT `fk_named_place_record10`
|
|
882 |
CONSTRAINT `fk_place_path_record10`
|
|
883 | 883 |
FOREIGN KEY (`id` ) |
884 | 884 |
REFERENCES `record` (`id` ) |
885 | 885 |
ON DELETE CASCADE |
Also available in: Unified diff
schemas/VegCore/VegCore.ERD.mwb: renamed named_place to place_path since place now serves the purpose that named_place used to (i.e. representing geographical areas)