-- Deploy gaia:api_2019_06_20_create_table_for_scan_face to mysql

BEGIN;

-- XXX Add DDLs here.
CREATE TABLE `api_face_one_image_v2` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `face_id` varchar(128) NOT NULL UNIQUE,
    `user_id` bigint NOT NULL DEFAULT 0,
    `face_url` varchar(300) NOT NULL DEFAULT '',
    `device_id` varchar(300) NOT NULL DEFAULT '',
    `create_time` datetime(6) NOT NULL,
    `update_time` datetime(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE INDEX `api_face_one_image_v2_user_id_8683b96e` ON `api_face_one_image_v2` (`user_id`);


COMMIT;
