Project

General

Profile

« Previous | Next » 

Revision 8548

schemas/VegCore/VegCore.ERD.mwb: taxon_assertion: removed fkey to taxon_concept because only parsed_taxon_assertions have a corresponding taxon_concept

View differences:

schemas/VegCore/VegCore.my.sql
70 70

  
71 71

  
72 72
-- -----------------------------------------------------
73
-- Table `taxon_concept`
74
-- -----------------------------------------------------
75
CREATE  TABLE IF NOT EXISTS `taxon_concept` (
76
  `id` TEXT NOT NULL ,
77
  `according_to` TEXT NOT NULL ,
78
  `parent` TEXT NULL ,
79
  `accepted_taxon` TEXT NULL ,
80
  PRIMARY KEY (`id`) ,
81
  INDEX `fk_taxon_taxon1` (`parent` ASC) ,
82
  INDEX `fk_taxon_concept_source1` (`according_to` ASC) ,
83
  INDEX `fk_taxon_concept_taxon_concept1` (`accepted_taxon` ASC) ,
84
  CONSTRAINT `fk_taxon_record1`
85
    FOREIGN KEY (`id` )
86
    REFERENCES `record` (`id` )
87
    ON DELETE CASCADE
88
    ON UPDATE CASCADE,
89
  CONSTRAINT `fk_taxon_taxon1`
90
    FOREIGN KEY (`parent` )
91
    REFERENCES `taxon_concept` (`id` )
92
    ON DELETE CASCADE
93
    ON UPDATE CASCADE,
94
  CONSTRAINT `fk_taxon_concept_source1`
95
    FOREIGN KEY (`according_to` )
96
    REFERENCES `source` (`id` )
97
    ON DELETE CASCADE
98
    ON UPDATE CASCADE,
99
  CONSTRAINT `fk_taxon_concept_taxon_concept1`
100
    FOREIGN KEY (`accepted_taxon` )
101
    REFERENCES `taxon_concept` (`id` )
102
    ON DELETE CASCADE
103
    ON UPDATE CASCADE)
104
ENGINE = InnoDB
105
DEFAULT CHARACTER SET = latin1
106
COLLATE = latin1_swedish_ci;
107

  
108

  
109
-- -----------------------------------------------------
110 73
-- Table `taxon_assertion`
111 74
-- -----------------------------------------------------
112 75
CREATE  TABLE IF NOT EXISTS `taxon_assertion` (
113 76
  `id` TEXT NOT NULL ,
114
  `taxon` TEXT NOT NULL ,
115 77
  PRIMARY KEY (`id`) ,
116
  INDEX `fk_qualified_taxon_name_taxon1` (`taxon` ASC) ,
117 78
  CONSTRAINT `fk_qualified_taxon_record1`
118 79
    FOREIGN KEY (`id` )
119 80
    REFERENCES `record` (`id` )
120 81
    ON DELETE CASCADE
121
    ON UPDATE CASCADE,
122
  CONSTRAINT `fk_qualified_taxon_name_taxon1`
123
    FOREIGN KEY (`taxon` )
124
    REFERENCES `taxon_concept` (`id` )
125
    ON DELETE CASCADE
126 82
    ON UPDATE CASCADE)
127 83
ENGINE = InnoDB
128 84
DEFAULT CHARACTER SET = latin1
......
528 484

  
529 485

  
530 486
-- -----------------------------------------------------
487
-- Table `taxon_concept`
488
-- -----------------------------------------------------
489
CREATE  TABLE IF NOT EXISTS `taxon_concept` (
490
  `id` TEXT NOT NULL ,
491
  `according_to` TEXT NOT NULL ,
492
  `parent` TEXT NULL ,
493
  `accepted_taxon` TEXT NULL ,
494
  PRIMARY KEY (`id`) ,
495
  INDEX `fk_taxon_taxon1` (`parent` ASC) ,
496
  INDEX `fk_taxon_concept_source1` (`according_to` ASC) ,
497
  INDEX `fk_taxon_concept_taxon_concept1` (`accepted_taxon` ASC) ,
498
  CONSTRAINT `fk_taxon_record1`
499
    FOREIGN KEY (`id` )
500
    REFERENCES `record` (`id` )
501
    ON DELETE CASCADE
502
    ON UPDATE CASCADE,
503
  CONSTRAINT `fk_taxon_taxon1`
504
    FOREIGN KEY (`parent` )
505
    REFERENCES `taxon_concept` (`id` )
506
    ON DELETE CASCADE
507
    ON UPDATE CASCADE,
508
  CONSTRAINT `fk_taxon_concept_source1`
509
    FOREIGN KEY (`according_to` )
510
    REFERENCES `source` (`id` )
511
    ON DELETE CASCADE
512
    ON UPDATE CASCADE,
513
  CONSTRAINT `fk_taxon_concept_taxon_concept1`
514
    FOREIGN KEY (`accepted_taxon` )
515
    REFERENCES `taxon_concept` (`id` )
516
    ON DELETE CASCADE
517
    ON UPDATE CASCADE)
518
ENGINE = InnoDB
519
DEFAULT CHARACTER SET = latin1
520
COLLATE = latin1_swedish_ci;
521

  
522

  
523
-- -----------------------------------------------------
531 524
-- Table `community`
532 525
-- -----------------------------------------------------
533 526
CREATE  TABLE IF NOT EXISTS `community` (

Also available in: Unified diff