-- Deploy mimas-talos:2020_07_06_add_recreat_personalize_action_tag_table to mysql

BEGIN;
DROP TABLE api_personalize_action_tag;

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


COMMIT;
