-- Deploy gaia:2019_09_16_add_heidong_scan_table to mysql

BEGIN;

CREATE TABLE `api_heidongdimensionimage` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `dimension` integer NOT NULL,
    `img_url` varchar(256) NOT NULL,
    `is_online` bool NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `updated_time` datetime(6) NOT NULL
)
;
CREATE TABLE `api_heidongdimension` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `dimension` integer NOT NULL,
    `facial_type` integer NOT NULL,
    `img_url` varchar(256) NOT NULL,
    `out_content` varchar(256) NOT NULL,
    `score` integer NOT NULL,
    `is_online` bool NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `updated_time` datetime(6) NOT NULL
)
;
CREATE TABLE `api_heidongdimensiondetail` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `dimension` integer NOT NULL,
    `classification` varchar(64) NOT NULL,
    `facial_type` varchar(3) NOT NULL,
    `score` integer NOT NULL,
    `analysis` varchar(256) NOT NULL,
    `polymer_id` varchar(32) NOT NULL,
    `is_online` bool NOT NULL,
    `client` bool NOT NULL,
    `xcx` bool NOT NULL,
    `choice_button_words` varchar(64) NOT NULL,
    `service_button_words` varchar(64) NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `updated_time` datetime(6) NOT NULL
)
;
COMMIT;
