-- Deploy gaia:api_2020_05_19_create_table_skin_face_result to mysql

BEGIN;

-- XXX Add DDLs here.
--
-- Create model SkinResult
--
CREATE TABLE `api_skin_face_result` (
    `id` integer NOT NULL PRIMARY KEY AUTO_INCREMENT,
    `skin_color` integer NOT NULL,
    `skin_age` integer NOT NULL,
    `eye_bags` integer NOT NULL,
    `dark_circle` integer NOT NULL,
    `forehead_wrinkle` integer NOT NULL,
    `crows_feet` integer NOT NULL,
    `eye_finelines` integer NOT NULL,
    `glabella_wrinkle` integer NOT NULL,
    `wrinkles` integer NOT NULL,
    `skin_oil` integer NOT NULL,
    `black_head` integer NOT NULL,
    `pores` integer NOT NULL,
    `acne` integer NOT NULL,
    `mole` integer NOT NULL,
    `skin_spot` integer NOT NULL,
    `image_url` varchar(80) NOT NULL,
    `device_id` varchar(100) NOT NULL,
    `user_id` integer NOT NULL,
    `created_time` datetime NOT NULL,
    `updated_time` datetime NOT NULL,
    `client_cache` bool NOT NULL,
    `face_diagnose` text NOT NULL
);
CREATE INDEX `api_skin_face_result_device_id_eaeb633a` ON `api_skin_face_result` (`device_id`);
CREATE INDEX `api_skin_face_result_user_id_fe001a21` ON `api_skin_face_result` (`user_id`);

COMMIT;
