-- Deploy gaia:face_2017_03_17_create_table_analyze to mysql


BEGIN;
CREATE TABLE `face_analyze` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `user_id` integer,
    `image_url` varchar(128) NOT NULL,
    `token` varchar(64) NOT NULL UNIQUE,
    `face_raw` longtext NOT NULL,
    `face_analyzed` longtext NOT NULL,
    `progress` varchar(16) NOT NULL,
    `status` varchar(16) NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `last_modified` datetime(6) NOT NULL
)
;
ALTER TABLE `face_analyze` ADD CONSTRAINT `user_id_refs_id_de8cf469` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`);
CREATE INDEX `face_analyze_6340c63c` ON `face_analyze` (`user_id`);
COMMIT;