-- Deploy gaia:hippo_2017_11_15_add_qdvertise_Table to mysql

BEGIN;

-- XXX Add DDLs here.

CREATE TABLE `hippo_advertise_conver_stats` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `stat_date` date NOT NULL,
    `time_str` datetime(6),
    `conversation_id` varchar(50),
    `city_id` varchar(50),
    `city_name` varchar(50),
    `province_id` varchar(50),
    `province_name` varchar(50),
    `doctor_id` varchar(100) NOT NULL,
    `merchant_id` bigint NOT NULL,
    `doctor_user_id` varchar(50),
    `user_id` varchar(50),
    `user_name` varchar(50),
    `birthday` date,
    `user_rights_level` varchar(20),
    `membership_level` varchar(20),
    `tag` longtext,
    `message_id` integer NOT NULL
)

;
ALTER TABLE  `hippo_advertise_conver_stats` ADD INDEX conver_merchant_id_state_date(merchant_id,stat_date);


COMMIT;
