-- Deploy gaia:api_2020_10_27_create_table_api_distribute_record to mysql

BEGIN;

-- XXX Add DDLs here.
CREATE TABLE `api_distribute_record` (
 `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY comment '主键',
 `distribute_id` varchar(128) NOT NULL comment '分销标识id',
 `order_id` varchar(128) NOT NULL comment '订单id',
 `distribute_type` integer NOT NULL comment '分销标识id类型',
 `create_time` datetime(6) NOT NULL comment '纪录创建时间',
 `update_time` datetime(6) NOT NULL comment '纪录更新时间'
 )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 comment '美购分销纪录表';
ALTER TABLE `api_distribute_record` ADD INDEX `idx_did_1` (`distribute_id`),
ADD INDEX `idx_oid_1` (`order_id`);
COMMIT;
