-- Deploy gaia:gm_ai_20190822_puzzle_image to mysql

BEGIN;

CREATE TABLE `api_puzzle_image` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `user_id` integer NOT NULL,
    `img_url_1` varchar(128) NOT NULL,
    `img_url_2` varchar(128) NOT NULL,
    `change_type` smallint NOT NULL,
    `generate_url` varchar(128) NOT NULL,
    `background_id` integer NOT NULL,
    `created_time` datetime(6) NOT NULL
);

CREATE INDEX `api_puzzle_image_user_index` ON `api_puzzle_image` (`user_id`);

COMMIT;
