 
 
 -- -----------------------------------------------------
--- Table `parteitool`.`antrag_abo`
--- -----------------------------------------------------
-CREATE  TABLE IF NOT EXISTS `parteitool`.`antrag_abo` (
+-- Table `antrag_abo`
+-- -----------------------------------------------------
+CREATE  TABLE IF NOT EXISTS `antrag_abo` (
   `antrag_id` INT NOT NULL ,
   `abonnent_id` INT NOT NULL ,
   PRIMARY KEY (`antrag_id`, `abonnent_id`) ,

  PRIMARY KEY (`id`) ,
  CONSTRAINT `fk_texte_veranstaltung1`
    FOREIGN KEY (`veranstaltung_id` )
    REFERENCES `parteitool`.`veranstaltung` (`id` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_texte_person1`
    FOREIGN KEY (`edit_person` )
    REFERENCES `parteitool`.`person` (`id` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `parteitool`.`cache`
-- -----------------------------------------------------
CREATE  TABLE IF NOT EXISTS `parteitool`.`cache` (
  `id` CHAR(32) NOT NULL ,
  `datum` TIMESTAMP NULL ,
  `daten` LONGBLOB NULL ,

  INDEX `abgeleitet_von` (`abgeleitet_von` ASC) ,
  CONSTRAINT `fk_antrag_veranstaltung`
    FOREIGN KEY (`veranstaltung` )
    REFERENCES `veranstaltung` (`id` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_antrag_antrag1`
    FOREIGN KEY (`abgeleitet_von` )
    REFERENCES `antrag` (`id` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;


-- -----------------------------------------------------
-- Table `person`
-- -----------------------------------------------------
CREATE  TABLE IF NOT EXISTS `person` (
  `id` INT NOT NULL AUTO_INCREMENT ,
  `typ` ENUM('person', 'organisation') NOT NULL ,
  `name` VARCHAR(100) NOT NULL ,
