-- Deploy mimas-talos:2020_07_06_add_personalize_action_tag to mysql

BEGIN;

CREATE TABLE `api_personalize_action_tag` (
      `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
      `date_index` date NOT NULL COMMENT '统计日期',
      `tag_info` varchar(64) NOT NULL COMMENT '标签相关信息',
      `device_id` varchar(64) NOT NULL COMMENT '设备id'
      );
ALTER TABLE `api_personalize_action_tag` ADD CONSTRAINT `uniq_date_index_device_id` UNIQUE (`date_index`, `device_id`);

COMMIT;
