CREATE TABLE IF NOT EXISTS `user_likes` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `id_user` INT(10) UNSIGNED NOT NULL,
  `id_company` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  INDEX `idx_user_likes_user` (`id_user` ASC),
  INDEX `idx_user_likes_company` (`id_company` ASC),
  CONSTRAINT `fk_user_likes_user`
    FOREIGN KEY (`id_user`)
    REFERENCES `users` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_user_likes_company`
    FOREIGN KEY (`id_company`)
    REFERENCES `companies` (`id`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8
COLLATE = utf8_general_ci;
