-- Deploy gaia:2019_08_15_api_topic_aggregation to mysql

BEGIN;

-- XXX Add DDLs here.

CREATE TABLE `api_topic_aggregation` (
    `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,
    `title` varchar(255) NOT NULL,
    `img_url` varchar(255) NOT NULL,
    `position` integer NOT NULL,
    `aggregate_id` varchar(255) NOT NULL,
    `success_time` datetime(6) NOT NULL,
    `failure_time` datetime(6) NOT NULL
)
;
CREATE INDEX `api_topic_aggregation_c3bd43a2` ON `api_topic_aggregation` (`update_time`);
CREATE INDEX `api_topic_aggregation_c1c4c920` ON `api_topic_aggregation` (`success_time`);
CREATE INDEX `api_topic_aggregation_838339a8` ON `api_topic_aggregation` (`failure_time`);

COMMIT;
