 -- MySQL Script generated by MySQL Workbench
--- Tue Mar 21 16:19:18 2017
+-- Sun Mar 26 20:32:43 2017
 -- Model: Interactive Conversation Archive    Version: 1.0
 -- MySQL Workbench Forward Engineering
 

CREATE TABLE IF NOT EXISTS `ica`.`sources` (
  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `jointsource_id` INT UNSIGNED NOT NULL,
  `content_id` INT UNSIGNED NOT NULL,
  `author_id` INT UNSIGNED NOT NULL,
  `type` TINYINT UNSIGNED NOT NULL,

    ON UPDATE NO ACTION,
  CONSTRAINT `fk_sources_contents1`
    FOREIGN KEY (`content_id`)
    REFERENCES `ica`.`contents` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_sources_contents2`
    FOREIGN KEY (`title_id`)
    REFERENCES `ica`.`contents` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
