Project

General

Profile

« Previous | Next » 

Revision 8563

schemas/VegCore/VegCore.ERD.mwb: removed invisible U+FEFF Unicode character

View differences:

schemas/VegCore/VegCore.my.sql
285 285

  
286 286

  
287 287
-- -----------------------------------------------------
288
-- Table `place`
288
-- Table `place`
289 289
-- -----------------------------------------------------
290
CREATE  TABLE IF NOT EXISTS `place` (
290
CREATE  TABLE IF NOT EXISTS `place` (
291 291
  `id` TEXT NOT NULL ,
292 292
  `parent` TEXT NOT NULL ,
293 293
  `named_place` TEXT NULL ,
294 294
  `coordinates` TEXT NULL ,
295 295
  PRIMARY KEY (`id`) ,
296
  INDEX `fk_place_coordinates1` (`coordinates` ASC) ,
297
  INDEX `fk_place_placename1` (`named_place` ASC) ,
298
  INDEX `fk_place1` (`parent` ASC) ,
299
  CONSTRAINT `fk_place_record1`
296
  INDEX `fk_place_coordinates1` (`coordinates` ASC) ,
297
  INDEX `fk_place_placename1` (`named_place` ASC) ,
298
  INDEX `fk_place1` (`parent` ASC) ,
299
  CONSTRAINT `fk_place_record1`
300 300
    FOREIGN KEY (`id` )
301 301
    REFERENCES `record` (`id` )
302 302
    ON DELETE CASCADE
303 303
    ON UPDATE CASCADE,
304
  CONSTRAINT `fk_place_coordinates1`
304
  CONSTRAINT `fk_place_coordinates1`
305 305
    FOREIGN KEY (`coordinates` )
306 306
    REFERENCES `coordinates` (`id` )
307 307
    ON DELETE CASCADE
308 308
    ON UPDATE CASCADE,
309
  CONSTRAINT `fk_place_placename1`
309
  CONSTRAINT `fk_place_placename1`
310 310
    FOREIGN KEY (`named_place` )
311 311
    REFERENCES `named_place` (`id` )
312 312
    ON DELETE CASCADE
313 313
    ON UPDATE CASCADE,
314
  CONSTRAINT `fk_place1`
314
  CONSTRAINT `fk_place1`
315 315
    FOREIGN KEY (`parent` )
316
    REFERENCES `place` (`id` )
316
    REFERENCES `place` (`id` )
317 317
    ON DELETE CASCADE
318 318
    ON UPDATE CASCADE)
319 319
ENGINE = InnoDB
......
343 343
CREATE  TABLE IF NOT EXISTS `event` (
344 344
  `id` TEXT NOT NULL ,
345 345
  `parent` TEXT NOT NULL ,
346
  `place` TEXT NULL ,
346
  `place` TEXT NULL ,
347 347
  `method` TEXT NULL ,
348 348
  PRIMARY KEY (`id`) ,
349
  INDEX `fk_event_place1` (`place` ASC) ,
349
  INDEX `fk_event_place1` (`place` ASC) ,
350 350
  INDEX `fk_event1` (`parent` ASC) ,
351 351
  INDEX `fk_event_method1` (`method` ASC) ,
352 352
  CONSTRAINT `fk_event_record1`
......
354 354
    REFERENCES `record` (`id` )
355 355
    ON DELETE CASCADE
356 356
    ON UPDATE CASCADE,
357
  CONSTRAINT `fk_event_place1`
358
    FOREIGN KEY (`place` )
359
    REFERENCES `place` (`id` )
357
  CONSTRAINT `fk_event_place1`
358
    FOREIGN KEY (`place` )
359
    REFERENCES `place` (`id` )
360 360
    ON DELETE CASCADE
361 361
    ON UPDATE CASCADE,
362 362
  CONSTRAINT `fk_event1`
......
655 655

  
656 656

  
657 657
-- -----------------------------------------------------
658
-- Table `place_observation`
658
-- Table `place_observation`
659 659
-- -----------------------------------------------------
660
CREATE  TABLE IF NOT EXISTS `place_observation` (
660
CREATE  TABLE IF NOT EXISTS `place_observation` (
661 661
  `id` TEXT NOT NULL ,
662
  `place` TEXT NOT NULL ,
662
  `place` TEXT NOT NULL ,
663 663
  `geological_context` TEXT NULL ,
664 664
  `community` TEXT NULL ,
665
  INDEX `fk_place_observation_place1` (`place` ASC) ,
666
  INDEX `fk_place_observation_geological_context1` (`geological_context` ASC) ,
667
  INDEX `fk_place_observation_community1` (`community` ASC) ,
668
  INDEX `fk_place_observation_event1` (`id` ASC) ,
665
  INDEX `fk_place_observation_place1` (`place` ASC) ,
666
  INDEX `fk_place_observation_geological_context1` (`geological_context` ASC) ,
667
  INDEX `fk_place_observation_community1` (`community` ASC) ,
668
  INDEX `fk_place_observation_event1` (`id` ASC) ,
669 669
  PRIMARY KEY (`id`) ,
670
  CONSTRAINT `fk_place_observation_place1`
671
    FOREIGN KEY (`place` )
672
    REFERENCES `place` (`id` )
670
  CONSTRAINT `fk_place_observation_place1`
671
    FOREIGN KEY (`place` )
672
    REFERENCES `place` (`id` )
673 673
    ON DELETE CASCADE
674 674
    ON UPDATE CASCADE,
675
  CONSTRAINT `fk_place_observation_geological_context1`
675
  CONSTRAINT `fk_place_observation_geological_context1`
676 676
    FOREIGN KEY (`geological_context` )
677 677
    REFERENCES `geological_context` (`id` )
678 678
    ON DELETE CASCADE
679 679
    ON UPDATE CASCADE,
680
  CONSTRAINT `fk_place_observation_community1`
680
  CONSTRAINT `fk_place_observation_community1`
681 681
    FOREIGN KEY (`community` )
682 682
    REFERENCES `community` (`id` )
683 683
    ON DELETE CASCADE
684 684
    ON UPDATE CASCADE,
685
  CONSTRAINT `fk_place_observation_event1`
685
  CONSTRAINT `fk_place_observation_event1`
686 686
    FOREIGN KEY (`id` )
687 687
    REFERENCES `event` (`id` )
688 688
    ON DELETE CASCADE
......
698 698
CREATE  TABLE IF NOT EXISTS `soil_observation` (
699 699
  `id` TEXT NOT NULL ,
700 700
  PRIMARY KEY (`id`) ,
701
  CONSTRAINT `fk_soil_observation_place_observation1`
701
  CONSTRAINT `fk_soil_observation_place_observation1`
702 702
    FOREIGN KEY (`id` )
703
    REFERENCES `place_observation` (`id` )
703
    REFERENCES `place_observation` (`id` )
704 704
    ON DELETE CASCADE
705 705
    ON UPDATE CASCADE)
706 706
ENGINE = InnoDB
......
714 714
CREATE  TABLE IF NOT EXISTS `plot` (
715 715
  `id` TEXT NOT NULL ,
716 716
  PRIMARY KEY (`id`) ,
717
  CONSTRAINT `fk_subplot_place1`
717
  CONSTRAINT `fk_subplot_place1`
718 718
    FOREIGN KEY (`id` )
719
    REFERENCES `place` (`id` )
719
    REFERENCES `place` (`id` )
720 720
    ON DELETE CASCADE
721 721
    ON UPDATE CASCADE)
722 722
ENGINE = InnoDB
......
897 897
  `stratum` TEXT NOT NULL ,
898 898
  PRIMARY KEY (`id`) ,
899 899
  INDEX `fk_plot_stratum_stratum1` (`stratum` ASC) ,
900
  CONSTRAINT `fk_subplot_place10`
900
  CONSTRAINT `fk_subplot_place10`
901 901
    FOREIGN KEY (`id` )
902
    REFERENCES `place` (`id` )
902
    REFERENCES `place` (`id` )
903 903
    ON DELETE CASCADE
904 904
    ON UPDATE CASCADE,
905 905
  CONSTRAINT `fk_plot_stratum_stratum1`

Also available in: Unified diff