-- Deploy gaia:2019_08_08_add_smart_rank_factor to mysql

BEGIN;

CREATE TABLE `api_smart_rank_factor` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `is_online` bool NOT NULL,
    `create_time` datetime(6) NOT NULL,
    `update_time` datetime(6) NOT NULL,
    `is_deleted` bool NOT NULL,
    `service_id` integer NOT NULL UNIQUE,
    `discount_value` double precision NOT NULL,
    `cpt_value` double precision NOT NULL,
    `click_price` double precision NOT NULL,
    `consult_value` double precision NOT NULL,
    `ctr_value` double precision NOT NULL
)
;
CREATE INDEX `api_smart_rank_factor_c3bd43a2` ON `api_smart_rank_factor` (`update_time`);
COMMIT;
