-- Deploy gaia:2019_10_30_add_sign_prize to mysql

BEGIN;

CREATE TABLE `api_sign_prize_v3` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `name` varchar(256) NOT NULL,
    `img_url` varchar(256) NOT NULL,
    `count` integer NOT NULL,
    `exchange_days` integer NOT NULL,
    `is_online` bool NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `updated_time` datetime(6) NOT NULL
)
;
CREATE TABLE `api_sign_exchanged_v3` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `user_id` integer NOT NULL,
    `prize_id` integer NOT NULL,
    `express_no` varchar(64),
    `created_time` datetime(6) NOT NULL,
    `updated_time` datetime(6) NOT NULL
)
;

COMMIT;
