CREATE TABLE IF NOT EXISTS `funsecretos`.`content_progress` (
  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `content_id` INT(11) UNSIGNED NOT NULL,
  `theme_id` INT(11) UNSIGNED NOT NULL,
  `user_id` INT(11) UNSIGNED NOT NULL,
  `completed` TINYINT(4) NULL DEFAULT 0 COMMENT '0-Incomplete, 1-Completed',
  `created_at` TIMESTAMP NULL,
  `updated_at` TIMESTAMP NULL,
  PRIMARY KEY (`id`),
  INDEX `fk_content_progress_users1_idx` (`user_id` ASC),
  INDEX `fk_content_progress_contents1_idx` (`content_id` ASC),
  INDEX `fk_content_progress_themes1_idx` (`theme_id` ASC),
  CONSTRAINT `fk_content_progress_users1`
    FOREIGN KEY (`user_id`)
    REFERENCES `funsecretos`.`users` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_content_progress_contents1`
    FOREIGN KEY (`content_id`)
    REFERENCES `funsecretos`.`contents` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_content_progress_themes1`
    FOREIGN KEY (`theme_id`)
    REFERENCES `funsecretos`.`themes` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB;