-- Deploy mimas-talos:2020-06-24-hot-content to mysql

BEGIN;


CREATE TABLE `api_hot_content` (
      `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
      `date_index` date NOT NULL COMMENT '日期',
      `content_id` integer NOT NULL COMMENT '内容id',
      `content_type` varchar(32) NOT NULL COMMENT '内容类型',
      `click_num` integer NOT NULL COMMENT '点击数',
      `is_push` bool NOT NULL DEFAULT 0 COMMENT '是否已推送'
      );
ALTER TABLE `api_hot_content` ADD CONSTRAINT `api_hot_content_date_index_uniq` UNIQUE (`date_index`, `content_type`, `content_id`);

COMMIT;
