-- Deploy gaia:talos_2017_06_07_create_my_reply_table to mysql

BEGIN;

-- XXX Add DDLs here.
CREATE TABLE `api_reply_collect` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `created_time` datetime(6) NOT NULL,
    `topic_reply_id` integer UNIQUE,
    `answer_id` integer UNIQUE,
    `user_id` integer NOT NULL,
    `reply_user_id` integer NOT NULL
)
;

CREATE INDEX `api_reply_collect_41e5f0d8` ON `api_reply_collect` (`created_time`);
CREATE INDEX `api_reply_collect_59317d5a` ON `api_reply_collect` (`user_id`, `created_time`);
CREATE INDEX `api_reply_collect_2fc8ef42` ON `api_reply_collect` (`reply_user_id`, `created_time`);

COMMIT;
