Project

General

Profile

« Previous | Next » 

Revision 8595

schemas/VegCore/VegCore.ERD.mwb: made first_publisher a field of source (fkey to party) instead of a subclass of it, because a source can be both an aggregator for some datasets and a first publisher for others and which one it is depends on the dataset

View differences:

schemas/VegCore/VegCore.my.sql
27 27
  `id` TEXT NOT NULL ,
28 28
  `parent` TEXT NOT NULL ,
29 29
  `name` TEXT NOT NULL ,
30
  `first_publisher` TEXT NULL ,
30 31
  `contact` TEXT NULL ,
31 32
  `info` SET('hstore') NULL ,
32 33
  PRIMARY KEY (`id`) ,
33 34
  INDEX `fk_source1` (`parent` ASC) ,
34 35
  INDEX `fk_source_party1` (`contact` ASC) ,
35 36
  UNIQUE INDEX `source_unique` (`parent` ASC, `name` ASC) ,
37
  INDEX `fk_source_party2` (`first_publisher` ASC) ,
36 38
  CONSTRAINT `fk_source1`
37 39
    FOREIGN KEY (`parent` )
38 40
    REFERENCES `source` (`id` )
......
42 44
    FOREIGN KEY (`contact` )
43 45
    REFERENCES `party` (`id` )
44 46
    ON DELETE CASCADE
47
    ON UPDATE CASCADE,
48
  CONSTRAINT `fk_source_party2`
49
    FOREIGN KEY (`first_publisher` )
50
    REFERENCES `party` (`id` )
51
    ON DELETE CASCADE
45 52
    ON UPDATE CASCADE)
46 53
ENGINE = InnoDB
47 54
DEFAULT CHARACTER SET = latin1
......
838 845

  
839 846

  
840 847
-- -----------------------------------------------------
841
-- Table `first_publisher`
842
-- -----------------------------------------------------
843
CREATE  TABLE IF NOT EXISTS `first_publisher` (
844
  `id` TEXT NOT NULL ,
845
  PRIMARY KEY (`id`) ,
846
  CONSTRAINT `fk_collection_source100`
847
    FOREIGN KEY (`id` )
848
    REFERENCES `source` (`id` )
849
    ON DELETE CASCADE
850
    ON UPDATE CASCADE)
851
ENGINE = InnoDB
852
DEFAULT CHARACTER SET = latin1
853
COLLATE = latin1_swedish_ci;
854

  
855

  
856
-- -----------------------------------------------------
857 848
-- Table `referenced_class`
858 849
-- -----------------------------------------------------
859 850
CREATE  TABLE IF NOT EXISTS `referenced_class` (

Also available in: Unified diff