Project

General

Profile

« Previous | Next » 

Revision 8544

schemas/VegCore/VegCore.ERD.mwb: parsed_taxon_assertion.matched_taxon: changed it to be an fkey to taxon_path, because the parsing must also populate the denormalized path fields in addition to defining a taxon_concept with the concatenated scientific name

View differences:

schemas/VegCore/VegCore.my.sql
692 692

  
693 693

  
694 694
-- -----------------------------------------------------
695
-- Table `taxon_path`
696
-- -----------------------------------------------------
697
CREATE  TABLE IF NOT EXISTS `taxon_path` (
698
  `id` TEXT NOT NULL ,
699
  PRIMARY KEY (`id`) ,
700
  CONSTRAINT `fk_taxon_path_taxon_concept1`
701
    FOREIGN KEY (`id` )
702
    REFERENCES `taxon_concept` (`id` )
703
    ON DELETE CASCADE
704
    ON UPDATE CASCADE)
705
ENGINE = InnoDB
706
DEFAULT CHARACTER SET = latin1
707
COLLATE = latin1_swedish_ci;
708

  
709

  
710
-- -----------------------------------------------------
695 711
-- Table `parsed_taxon_assertion`
696 712
-- -----------------------------------------------------
697 713
CREATE  TABLE IF NOT EXISTS `parsed_taxon_assertion` (
698 714
  `id` TEXT NOT NULL ,
699 715
  `matched_taxon` TEXT NULL ,
700 716
  PRIMARY KEY (`id`) ,
701
  INDEX `fk_parsed_taxon_assertion_taxon_concept1` (`matched_taxon` ASC) ,
717
  INDEX `fk_parsed_taxon_assertion_taxon_path1` (`matched_taxon` ASC) ,
702 718
  CONSTRAINT `fk_matched_taxon_qualified_taxon10`
703 719
    FOREIGN KEY (`id` )
704 720
    REFERENCES `taxon_assertion` (`id` )
705 721
    ON DELETE CASCADE
706 722
    ON UPDATE CASCADE,
707
  CONSTRAINT `fk_parsed_taxon_assertion_taxon_concept1`
723
  CONSTRAINT `fk_parsed_taxon_assertion_taxon_path1`
708 724
    FOREIGN KEY (`matched_taxon` )
709
    REFERENCES `taxon_concept` (`id` )
725
    REFERENCES `taxon_path` (`id` )
710 726
    ON DELETE CASCADE
711 727
    ON UPDATE CASCADE)
712 728
ENGINE = InnoDB
......
863 879
COLLATE = latin1_swedish_ci;
864 880

  
865 881

  
866
-- -----------------------------------------------------
867
-- Table `taxon_path`
868
-- -----------------------------------------------------
869
CREATE  TABLE IF NOT EXISTS `taxon_path` (
870
  `id` TEXT NOT NULL ,
871
  PRIMARY KEY (`id`) ,
872
  CONSTRAINT `fk_taxon_path_taxon_concept1`
873
    FOREIGN KEY (`id` )
874
    REFERENCES `taxon_concept` (`id` )
875
    ON DELETE CASCADE
876
    ON UPDATE CASCADE)
877
ENGINE = InnoDB
878
DEFAULT CHARACTER SET = latin1
879
COLLATE = latin1_swedish_ci;
880 882

  
881

  
882

  
883 883
SET SQL_MODE=@OLD_SQL_MODE;
884 884
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
885 885
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

Also available in: Unified diff